Skip to content

Commit 0f1c807

Browse files
authored
Merge pull request #418 from AndersonTorres/nix
Nix updates
2 parents d52bec6 + a127393 commit 0f1c807

File tree

13 files changed

+22738
-81
lines changed

13 files changed

+22738
-81
lines changed

snippets.html

Lines changed: 22593 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

snippets/nix-mode/buildPhase

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
# key: bp
44
# --
55
buildPhase= ''
6+
runHook preBuild
67
$1
8+
runHook postBuild
79
'';
810
$0

snippets/nix-mode/callPackage

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# -*- mode: snippet -*-
2+
# name: callPackage
3+
# key: ca
4+
# --
5+
$1 = callPackage ../$2/$1 { };
6+
$0

snippets/nix-mode/checkPhase

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
# key: ch
44
# --
55
checkPhase= ''
6+
runHook preCheck
67
$1
8+
runHook postCheck
79
'';
810
$0

snippets/nix-mode/configurePhase

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
# key: cp
44
# --
55
configurePhase= ''
6+
runHook preConfigure
67
$1
8+
runHook postConfigure
79
'';
810
$0

snippets/nix-mode/distPhase

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
# key: dp
44
# --
55
distPhase= ''
6+
runHook preDist
67
$1
8+
runHook postDist
79
'';
810
$0

snippets/nix-mode/fixPhase renamed to snippets/nix-mode/fixupPhase

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
# name: fixPhase
33
# key: fp
44
# --
5-
fixPhase= ''
5+
fixupPhase= ''
6+
runHook preFixup
67
$1
8+
runHook postFixup
79
'';
810
$0

snippets/nix-mode/installCheckPhase

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
# key: ic
44
# --
55
installCheckPhase= ''
6+
runHook preInstallCheck
67
$1
8+
runHook postInstallCheck
79
'';
810
$0

snippets/nix-mode/installPhase

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@
33
# key: ip
44
# --
55
installPhase= ''
6+
runHook preInstall
67
${1: mkdir -p \$out/bin
78
for f in \$(find . -executable -type f);
89
do
910
cp \$f \$out/bin/
1011
done}
12+
runHook postInstall
1113
'';
1214
$0

snippets/nix-mode/package_github

Lines changed: 65 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -2,66 +2,81 @@
22
# name: package github
33
# key: pg
44
# --
5-
{ stdenv, fetchFromGitHub$1 }:
5+
{ lib
6+
, stdenv
7+
, fetchFromGitHub
8+
, $1
9+
, $2
10+
}:
611

712
stdenv.mkDerivation rec {
8-
pname = "$2";
9-
version = "$3";
13+
pname = "$3";
14+
version = "$4";
1015

1116
src = fetchFromGitHub {
12-
owner = "$4";
13-
repo = "$2";
14-
rev = "${5:v\$\{version\}}";
15-
sha256 = "$6";
17+
owner = "$5";
18+
repo = ${6:pname};
19+
rev = "${7:v\$\{version\}}";
20+
sha256 = "${8:\$\{lib.fakeSha256\}}";
1621
};
1722

18-
buildInputs = [ $1 ];
23+
nativeBuildInputs = [ ${1:$(replace-regexp-in-string " *" " "(subst-char-in-string ?, ? yas-text))} ];
24+
buildInputs = [
25+
${2:$(replace-regexp-in-string " *" " "(subst-char-in-string ?, ? yas-text))}
26+
];
1927

20-
meta = with stdenv.lib; {
21-
description = "$7";
22-
homepage = "https://${8:github.com/$4/$2}";
23-
24-
license = licenses.${9:$$
28+
meta = with lib; {
29+
homepage = "https://${9:github.com/$5/$3}";
30+
description = "$10";
31+
longDescription = ''
32+
$11
33+
'';
34+
license = licenses.${12:$$
2535
(yas-choose-value '(
26-
"asl20"
27-
"bsd2"
28-
"bsd3"
29-
"free"
30-
"gpl2Only"
31-
"gpl2Plus"
32-
"gpl3Only"
33-
"gpl3Plus"
34-
"isc"
35-
"lgpl21Only"
36-
"lgpl21Plus"
37-
"lgpl2Only"
38-
"lgpl2Plus"
39-
"lgpl3Only"
40-
"mit"
41-
"mpl20"
42-
"ofl"
43-
"unfree"
36+
"agpl3"
37+
"asl20"
38+
"bsd1"
39+
"bsd2"
40+
"bsd3"
41+
"free"
42+
"gpl2"
43+
"gpl2Only"
44+
"gpl2Plus"
45+
"gpl3"
46+
"gpl3Only"
47+
"gpl3Plus"
48+
"isc"
49+
"lgpl21Only"
50+
"lgpl21Plus"
51+
"lgpl2Only"
52+
"lgpl2Plus"
53+
"lgpl3"
54+
"lgpl3Only"
55+
"mit"
56+
"mpl20"
57+
"ofl"
58+
"unfree"
4459
))};
45-
maintainers = with maintainers; [ $10 ];
46-
platforms = platforms.${11:$$
60+
maintainers = with maintainers; [ $12 ];
61+
platforms = platforms.${13:$$
4762
(yas-choose-value '(
48-
"linux"
49-
"unix"
50-
"all"
51-
"darwin"
52-
"gnu"
53-
"freebsd"
54-
"openbsd"
55-
"netbsd"
56-
"cygwin"
57-
"illumos"
58-
"none"
59-
"allBut"
60-
"mesaPlatforms"
61-
"x86"
62-
"i686"
63-
"arm"
64-
"mips"
63+
"all"
64+
"allBut"
65+
"arm"
66+
"cygwin"
67+
"darwin"
68+
"freebsd"
69+
"gnu"
70+
"i686"
71+
"illumos"
72+
"linux"
73+
"mesaPlatforms"
74+
"mips"
75+
"netbsd"
76+
"none"
77+
"openbsd"
78+
"unix"
79+
"x86"
6580
))};
6681
};
6782
}

0 commit comments

Comments
 (0)