tangled
alpha
login
or
join now
da157.id
/
website
0
fork
atom
this repo has no description
0
fork
atom
overview
issues
pulls
pipelines
add commit to footer
0xda157
2 months ago
2df4010a
7d5a963e
+30
-4
3 changed files
expand all
collapse all
unified
split
flake.nix
package.nix
templates
partials
footer.html
+6
-2
flake.nix
···
5
5
};
6
6
7
7
outputs =
8
8
-
{ nixpkgs, systems, ... }:
8
8
+
{
9
9
+
self,
10
10
+
nixpkgs,
11
11
+
systems,
12
12
+
}:
9
13
let
10
14
inherit (nixpkgs) lib;
11
15
forEachPkgs = f: lib.genAttrs (import systems) (system: f nixpkgs.legacyPackages.${system});
12
16
in
13
17
{
14
18
packages = forEachPkgs (pkgs: {
15
15
-
default = pkgs.callPackage ./package.nix { };
19
19
+
default = pkgs.callPackage ./package.nix { inherit self; };
16
20
});
17
21
18
22
devShells = forEachPkgs (pkgs: {
+22
-1
package.nix
···
1
1
-
{ stdenv, zola }:
1
1
+
{
2
2
+
self,
3
3
+
lib,
4
4
+
stdenv,
5
5
+
zola,
6
6
+
}:
2
7
stdenv.mkDerivation {
3
8
pname = "da157dotid";
4
9
version = "0";
···
6
11
src = ./.;
7
12
8
13
nativeBuildInputs = [ zola ];
14
14
+
15
15
+
postPatch =
16
16
+
let
17
17
+
commit = self.rev or lib.removeSuffix "-dirty" self.dirtyRev;
18
18
+
rev = lib.pipe (self.rev or self.dirtyRev) [
19
19
+
lib.stringToCharacters
20
20
+
(lib.take 5)
21
21
+
lib.concatStrings
22
22
+
(str: if self ? rev then str else "${str}-dirty")
23
23
+
];
24
24
+
in
25
25
+
''
26
26
+
substituteInPlace templates/partials/footer.html \
27
27
+
--replace %COMMIT% ${commit} \
28
28
+
--replace %REV% ${rev}
29
29
+
'';
9
30
10
31
buildPhase = ''
11
32
zola build -o $out
+2
-1
templates/partials/footer.html
···
3
3
© 0xda157 2024-{{ now(utc=true) | date(format="%Y") }}
4
4
| CC BY-SA 4.0
5
5
| <a href="https://codeberg.org/da157/website">source code</a>
6
6
-
| built at {{ now(timestamp=true, utc=true) | date(format="%F %RZ") }}
6
6
+
| built at {{ now(timestamp=true, utc=true) | date(format="%F %RZ") }},
7
7
+
commit <a href="https://codeberg.org/da157/website/commit/%COMMIT%">%REV%</a>
7
8
</div>
8
9
<div id="footer-webrings">
9
10
webrings: