Skip to content

Commit 491f1b9

Browse files
committed
Modernize nix-mode/package_github
1 parent 1f90ffb commit 491f1b9

File tree

1 file changed

+29
-18
lines changed

1 file changed

+29
-18
lines changed

snippets/nix-mode/package_github

Lines changed: 29 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
# key: pg
44
# --
55
{ stdenv, fetchFromGitHub$1 }:
6+
67
stdenv.mkDerivation rec {
7-
name = "$2-\$\{version\}";
8+
pname = "$2";
89
version = "$3";
910

1011
src = fetchFromGitHub {
@@ -14,36 +15,46 @@ stdenv.mkDerivation rec {
1415
sha256 = "$6";
1516
};
1617

17-
buildInputs = [ $1];
18+
buildInputs = [ $1 ];
1819

19-
meta = {
20+
meta = with stdenv.lib; {
2021
description = "$7";
21-
homepage = https://${8:github.com/$4/$2};
22+
homepage = "https://${8:github.com/$4/$2}";
2223

23-
license = stdenv.lib.licenses.${9:$$
24+
license = licenses.${9:$$
2425
(yas-choose-value '(
25-
"agpl3"
26-
"asl20"
27-
"bsd2"
28-
"bsd3"
29-
"gpl2"
30-
"gpl3"
31-
"lgpl3"
32-
"mit"
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"
3344
))};
34-
maintainers = [ stdenv.lib.maintainers.$10 ];
35-
platforms = stdenv.lib.platforms.${11:$$
45+
maintainers = with maintainers; [ $10 ];
46+
platforms = platforms.${11:$$
3647
(yas-choose-value '(
37-
"gnu"
3848
"linux"
49+
"unix"
50+
"all"
3951
"darwin"
52+
"gnu"
4053
"freebsd"
4154
"openbsd"
4255
"netbsd"
4356
"cygwin"
4457
"illumos"
45-
"unix"
46-
"all"
4758
"none"
4859
"allBut"
4960
"mesaPlatforms"

0 commit comments

Comments
 (0)