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 version
0xda157
2 months ago
d0878c31
452cce23
+15
-16
1 changed file
expand all
collapse all
unified
split
package.nix
+15
-16
package.nix
···
4
4
stdenv,
5
5
zola,
6
6
}:
7
7
+
let
8
8
+
commit = self.rev or (lib.removeSuffix "-dirty" self.dirtyRev);
9
9
+
rev = lib.pipe (self.rev or self.dirtyRev) [
10
10
+
lib.stringToCharacters
11
11
+
(lib.take 5)
12
12
+
lib.concatStrings
13
13
+
(str: if self ? rev then str else "${str}-dirty")
14
14
+
];
15
15
+
in
7
16
stdenv.mkDerivation {
8
17
pname = "da157dotid";
9
9
-
version = "0";
18
18
+
version = "0+commit=${rev}";
10
19
11
20
src = ./.;
12
21
13
22
nativeBuildInputs = [ zola ];
14
23
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
-
'';
24
24
+
postPatch = ''
25
25
+
substituteInPlace templates/partials/footer.html \
26
26
+
--replace %COMMIT% ${commit} \
27
27
+
--replace %REV% ${rev}
28
28
+
'';
30
29
31
30
buildPhase = ''
32
31
zola build -o $out