Compare commits

...

13 Commits

Author SHA1 Message Date
394e975724 Merge remote-tracking branch 'upstream/main' 2024-06-18 19:57:42 +12:00
Matthew Esposito
9a7da3abce
Merge pull request #142 from runofthemillgeek/fix/font-weight-in-font-face
Add font-weight range in @font-face rule
2024-06-13 23:13:27 -04:00
Sangeeth Sudheer
7fa37e48d5
Add font-weight range in @font-face rule
This makes Safari render the bold weights correctly which otherwise
looks wrong.
2024-06-11 21:16:44 +05:30
Matthew Esposito
a6f901c094
Merge pull request #128 from arulagrawal/nix-flake
add nix flake
2024-06-04 22:49:33 -04:00
Matthew Esposito
afad65f204
Merge pull request #127 from pimlie/patch-1
fix: healthcheck in Dockerfile
2024-06-04 22:48:51 -04:00
Matthew Esposito
c12da45059
Merge pull request #121 from bennettmsherman/patch-1
Properly apply REDLIB_DEFAULT_HIDE_SIDEBAR_AND_SUMMARY
2024-06-04 22:48:33 -04:00
Matthew Esposito
1132d73975
Merge pull request #134 from EMarshal/main 2024-06-02 22:08:38 -04:00
Éli Marshal
8ece7562ec Remove obsolete references to latest-arm and latest-armv7 images 2024-06-02 18:45:49 -06:00
Matthew Esposito
08e463fd44
Merge pull request #126 from Harm133/main
Create build-artifacts on release
2024-06-02 18:17:05 -04:00
Arul Agrawal
ec11a5511b
add nix flake 2024-05-31 17:10:36 +04:00
Pim
3caa0592f3
fix: healthcheck in Dockerfile
Fix typo causing wget to return a warning:

```
# wget --q
wget: option '--q' is ambiguous; possibilities: '--quiet' '--quota'
```
2024-05-31 11:40:01 +02:00
Harm133
190c92339e
Update build-artifacts.yaml
Only build artifacts on published release
2024-05-31 10:19:44 +02:00
Ben Sherman
17c7738d6e
Properly apply REDLIB_DEFAULT_HIDE_SIDEBAR_AND_SUMMARY
This change fixes the REDLIB_DEFAULT_HIDE_SIDEBAR_AND_SUMMARY environment variable being ignored.
2024-05-30 20:40:16 -07:00
2 changed files with 177 additions and 0 deletions

106
flake.lock Normal file
View File

@ -0,0 +1,106 @@
{
"nodes": {
"crane": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1717025063,
"narHash": "sha256-dIubLa56W9sNNz0e8jGxrX3CAkPXsq7snuFA/Ie6dn8=",
"owner": "ipetkov",
"repo": "crane",
"rev": "480dff0be03dac0e51a8dfc26e882b0d123a450e",
"type": "github"
},
"original": {
"owner": "ipetkov",
"repo": "crane",
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1717112898,
"narHash": "sha256-7R2ZvOnvd9h8fDd65p0JnB7wXfUvreox3xFdYWd1BnY=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "6132b0f6e344ce2fe34fc051b72fb46e34f668e0",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"crane": "crane",
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs",
"rust-overlay": "rust-overlay"
}
},
"rust-overlay": {
"inputs": {
"flake-utils": [
"flake-utils"
],
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1717121863,
"narHash": "sha256-/3sxIe7MZqF/jw1RTQCSmgTjwVod43mmrk84m50MJQ4=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "2a7b53172ed08f856b8382d7dcfd36a4e0cbd866",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

71
flake.nix Normal file
View File

@ -0,0 +1,71 @@
{
description = "Redlib: Private front-end for Reddit";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
crane = {
url = "github:ipetkov/crane";
inputs.nixpkgs.follows = "nixpkgs";
};
flake-utils.url = "github:numtide/flake-utils";
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs = {
nixpkgs.follows = "nixpkgs";
flake-utils.follows = "flake-utils";
};
};
};
outputs = { nixpkgs, crane, flake-utils, rust-overlay, ... }:
flake-utils.lib.eachSystem [ "x86_64-linux" ] (system:
let
pkgs = import nixpkgs {
inherit system;
overlays = [ (import rust-overlay) ];
};
inherit (pkgs) lib;
rustToolchain = pkgs.rust-bin.stable.latest.default.override {
targets = [ "x86_64-unknown-linux-musl" ];
};
craneLib = (crane.mkLib pkgs).overrideToolchain rustToolchain;
src = lib.cleanSourceWith {
src = craneLib.path ./.;
filter = path: type:
(lib.hasInfix "/templates/" path) ||
(lib.hasInfix "/static/" path) ||
(craneLib.filterCargoSources path type);
};
redlib = craneLib.buildPackage {
inherit src;
strictDeps = true;
doCheck = false;
CARGO_BUILD_TARGET = "x86_64-unknown-linux-musl";
CARGO_BUILD_RUSTFLAGS = "-C target-feature=+crt-static";
};
in
{
checks = {
my-crate = redlib;
};
packages.default = redlib;
packages.docker = pkgs.dockerTools.buildImage {
name = "quay.io/redlib/redlib";
tag = "latest";
created = "now";
copyToRoot = with pkgs.dockerTools; [ caCertificates fakeNss ];
config.Cmd = "${redlib}/bin/redlib";
};
});
}