git.iko.soy/typeable/nixpkgs
on master help sign in
pantheon: no bash update script, nixpkgs_github_update
95dfa8bworldofpeace
pkgs/desktops/pantheon/apps/appcenter/default.nix+1−1
@@ -39,7 +39,7 @@ stdenv.mkDerivation rec {
39
39
40 passthru = {
40 passthru = {
41 updateScript = pantheon.updateScript {
41 updateScript = pantheon.updateScript {
42− repoName = pname;
42+ attrPath = "pantheon.${pname}";
43 };
43 };
44 };
44 };
45
45
pkgs/desktops/pantheon/apps/elementary-calculator/default.nix+1−2
@@ -31,8 +31,7 @@ stdenv.mkDerivation rec {
31
31
32 passthru = {
32 passthru = {
33 updateScript = pantheon.updateScript {
33 updateScript = pantheon.updateScript {
34− inherit repoName;
35− attrPath = pname;
34+ attrPath = "pantheon.${pname}";
36 };
35 };
37 };
36 };
38
37
pkgs/desktops/pantheon/apps/elementary-calendar/default.nix+1−2
@@ -38,8 +38,7 @@ stdenv.mkDerivation rec {
38
38
39 passthru = {
39 passthru = {
40 updateScript = pantheon.updateScript {
40 updateScript = pantheon.updateScript {
41− inherit repoName;
42− attrPath = pname;
41+ attrPath = "pantheon.${pname}";
43 };
42 };
44 };
43 };
45
44
pkgs/desktops/pantheon/apps/elementary-camera/default.nix+1−2
@@ -36,8 +36,7 @@ stdenv.mkDerivation rec {
36
36
37 passthru = {
37 passthru = {
38 updateScript = pantheon.updateScript {
38 updateScript = pantheon.updateScript {
39− inherit repoName;
40− attrPath = pname;
39+ attrPath = "pantheon.${pname}";
41 };
40 };
42 };
41 };
43
42
pkgs/desktops/pantheon/apps/elementary-code/default.nix+1−2
@@ -40,8 +40,7 @@ stdenv.mkDerivation rec {
40
40
41 passthru = {
41 passthru = {
42 updateScript = pantheon.updateScript {
42 updateScript = pantheon.updateScript {
43− inherit repoName;
44− attrPath = pname;
43+ attrPath = "pantheon.${pname}";
45 };
44 };
46 };
45 };
47
46
pkgs/desktops/pantheon/apps/elementary-feedback/default.nix+1−2
@@ -31,8 +31,7 @@ stdenv.mkDerivation rec {
31
31
32 passthru = {
32 passthru = {
33 updateScript = pantheon.updateScript {
33 updateScript = pantheon.updateScript {
34− inherit repoName;
35− attrPath = pname;
34+ attrPath = "pantheon.${pname}";
36 };
35 };
37 };
36 };
38
37
pkgs/desktops/pantheon/apps/elementary-files/default.nix+1−2
@@ -45,8 +45,7 @@ stdenv.mkDerivation rec {
45
45
46 passthru = {
46 passthru = {
47 updateScript = pantheon.updateScript {
47 updateScript = pantheon.updateScript {
48− inherit repoName;
49− attrPath = pname;
48+ attrPath = "pantheon.${pname}";
50 };
49 };
51 };
50 };
52
51
pkgs/desktops/pantheon/apps/elementary-music/default.nix+1−2
@@ -42,8 +42,7 @@ stdenv.mkDerivation rec {
42
42
43 passthru = {
43 passthru = {
44 updateScript = pantheon.updateScript {
44 updateScript = pantheon.updateScript {
45− inherit repoName;
46− attrPath = pname;
45+ attrPath = "pantheon.${pname}";
47 };
46 };
48 };
47 };
49
48
pkgs/desktops/pantheon/apps/elementary-photos/default.nix+1−2
@@ -46,8 +46,7 @@ stdenv.mkDerivation rec {
46
46
47 passthru = {
47 passthru = {
48 updateScript = pantheon.updateScript {
48 updateScript = pantheon.updateScript {
49− inherit repoName;
50− attrPath = pname;
49+ attrPath = "pantheon.${pname}";
51 };
50 };
52 };
51 };
53
52
pkgs/desktops/pantheon/apps/elementary-screenshot-tool/default.nix+1−2
@@ -30,8 +30,7 @@ stdenv.mkDerivation rec {
30
30
31 passthru = {
31 passthru = {
32 updateScript = pantheon.updateScript {
32 updateScript = pantheon.updateScript {
33− inherit repoName;
34− attrPath = pname;
33+ attrPath = "pantheon.${pname}";
35 };
34 };
36 };
35 };
37
36
pkgs/desktops/pantheon/apps/elementary-terminal/default.nix+1−2
@@ -33,8 +33,7 @@ stdenv.mkDerivation rec {
33
33
34 passthru = {
34 passthru = {
35 updateScript = pantheon.updateScript {
35 updateScript = pantheon.updateScript {
36− inherit repoName;
37− attrPath = pname;
36+ attrPath = "pantheon.${pname}";
38 };
37 };
39 };
38 };
40
39
pkgs/desktops/pantheon/apps/elementary-videos/default.nix+1−2
@@ -32,8 +32,7 @@ stdenv.mkDerivation rec {
32
32
33 passthru = {
33 passthru = {
34 updateScript = pantheon.updateScript {
34 updateScript = pantheon.updateScript {
35− inherit repoName;
36− attrPath = pname;
35+ attrPath = "pantheon.${pname}";
37 };
36 };
38 };
37 };
39
38
pkgs/desktops/pantheon/apps/sideload/default.nix+1−1
@@ -32,7 +32,7 @@ stdenv.mkDerivation rec {
32
32
33 passthru = {
33 passthru = {
34 updateScript = pantheon.updateScript {
34 updateScript = pantheon.updateScript {
35− repoName = pname;
35+ attrPath = "pantheon.${pname}";
36 };
36 };
37 };
37 };
38
38
pkgs/desktops/pantheon/apps/switchboard-plugs/a11y/default.nix+1−1
@@ -33,7 +33,7 @@ stdenv.mkDerivation rec {
33
33
34 passthru = {
34 passthru = {
35 updateScript = pantheon.updateScript {
35 updateScript = pantheon.updateScript {
36− repoName = pname;
36+ attrPath = "pantheon.${pname}";
37 };
37 };
38 };
38 };
39
39
pkgs/desktops/pantheon/apps/switchboard-plugs/about/default.nix+1−1
@@ -27,7 +27,7 @@ stdenv.mkDerivation rec {
27
27
28 passthru = {
28 passthru = {
29 updateScript = pantheon.updateScript {
29 updateScript = pantheon.updateScript {
30− repoName = pname;
30+ attrPath = "pantheon.${pname}";
31 };
31 };
32 };
32 };
33
33
pkgs/desktops/pantheon/apps/switchboard-plugs/applications/default.nix+1−1
@@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
24
24
25 passthru = {
25 passthru = {
26 updateScript = pantheon.updateScript {
26 updateScript = pantheon.updateScript {
27− repoName = pname;
27+ attrPath = "pantheon.${pname}";
28 };
28 };
29 };
29 };
30
30
pkgs/desktops/pantheon/apps/switchboard-plugs/bluetooth/default.nix+1−1
@@ -25,7 +25,7 @@ stdenv.mkDerivation rec {
25
25
26 passthru = {
26 passthru = {
27 updateScript = pantheon.updateScript {
27 updateScript = pantheon.updateScript {
28− repoName = pname;
28+ attrPath = "pantheon.${pname}";
29 };
29 };
30 };
30 };
31
31
pkgs/desktops/pantheon/apps/switchboard-plugs/datetime/default.nix+1−1
@@ -27,7 +27,7 @@ stdenv.mkDerivation rec {
27
27
28 passthru = {
28 passthru = {
29 updateScript = pantheon.updateScript {
29 updateScript = pantheon.updateScript {
30− repoName = pname;
30+ attrPath = "pantheon.${pname}";
31 };
31 };
32 };
32 };
33
33
pkgs/desktops/pantheon/apps/switchboard-plugs/display/default.nix+1−1
@@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
24
24
25 passthru = {
25 passthru = {
26 updateScript = pantheon.updateScript {
26 updateScript = pantheon.updateScript {
27− repoName = pname;
27+ attrPath = "pantheon.${pname}";
28 };
28 };
29 };
29 };
30
30
pkgs/desktops/pantheon/apps/switchboard-plugs/keyboard/default.nix+1−1
@@ -30,7 +30,7 @@ stdenv.mkDerivation rec {
30
30
31 passthru = {
31 passthru = {
32 updateScript = pantheon.updateScript {
32 updateScript = pantheon.updateScript {
33− repoName = pname;
33+ attrPath = "pantheon.${pname}";
34 };
34 };
35 };
35 };
36
36
pkgs/desktops/pantheon/apps/switchboard-plugs/mouse-touchpad/default.nix+1−1
@@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
26
26
27 passthru = {
27 passthru = {
28 updateScript = pantheon.updateScript {
28 updateScript = pantheon.updateScript {
29− repoName = pname;
29+ attrPath = "pantheon.${pname}";
30 };
30 };
31 };
31 };
32
32
pkgs/desktops/pantheon/apps/switchboard-plugs/network/default.nix+1−1
@@ -27,7 +27,7 @@ stdenv.mkDerivation rec {
27
27
28 passthru = {
28 passthru = {
29 updateScript = pantheon.updateScript {
29 updateScript = pantheon.updateScript {
30− repoName = pname;
30+ attrPath = "pantheon.${pname}";
31 };
31 };
32 };
32 };
33
33
pkgs/desktops/pantheon/apps/switchboard-plugs/notifications/default.nix+1−1
@@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
24
24
25 passthru = {
25 passthru = {
26 updateScript = pantheon.updateScript {
26 updateScript = pantheon.updateScript {
27− repoName = pname;
27+ attrPath = "pantheon.${pname}";
28 };
28 };
29 };
29 };
30
30
pkgs/desktops/pantheon/apps/switchboard-plugs/onlineaccounts/default.nix+1−1
@@ -31,7 +31,7 @@ stdenv.mkDerivation rec {
31
31
32 passthru = {
32 passthru = {
33 updateScript = pantheon.updateScript {
33 updateScript = pantheon.updateScript {
34− repoName = pname;
34+ attrPath = "pantheon.${pname}";
35 };
35 };
36 };
36 };
37
37
pkgs/desktops/pantheon/apps/switchboard-plugs/pantheon-shell/default.nix+1−1
@@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
15
15
16 passthru = {
16 passthru = {
17 updateScript = pantheon.updateScript {
17 updateScript = pantheon.updateScript {
18− repoName = pname;
18+ attrPath = "pantheon.${pname}";
19 };
19 };
20 };
20 };
21
21
pkgs/desktops/pantheon/apps/switchboard-plugs/power/default.nix+1−1
@@ -30,7 +30,7 @@ stdenv.mkDerivation rec {
30
30
31 passthru = {
31 passthru = {
32 updateScript = pantheon.updateScript {
32 updateScript = pantheon.updateScript {
33− repoName = pname;
33+ attrPath = "pantheon.${pname}";
34 };
34 };
35 };
35 };
36
36
pkgs/desktops/pantheon/apps/switchboard-plugs/printers/default.nix+1−1
@@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
26
26
27 passthru = {
27 passthru = {
28 updateScript = pantheon.updateScript {
28 updateScript = pantheon.updateScript {
29− repoName = pname;
29+ attrPath = "pantheon.${pname}";
30 };
30 };
31 };
31 };
32
32
pkgs/desktops/pantheon/apps/switchboard-plugs/security-privacy/default.nix+1−1
@@ -29,7 +29,7 @@ stdenv.mkDerivation rec {
29
29
30 passthru = {
30 passthru = {
31 updateScript = pantheon.updateScript {
31 updateScript = pantheon.updateScript {
32− repoName = pname;
32+ attrPath = "pantheon.${pname}";
33 };
33 };
34 };
34 };
35
35
pkgs/desktops/pantheon/apps/switchboard-plugs/sharing/default.nix+1−1
@@ -25,7 +25,7 @@ stdenv.mkDerivation rec {
25
25
26 passthru = {
26 passthru = {
27 updateScript = pantheon.updateScript {
27 updateScript = pantheon.updateScript {
28− repoName = pname;
28+ attrPath = "pantheon.${pname}";
29 };
29 };
30 };
30 };
31
31
pkgs/desktops/pantheon/apps/switchboard-plugs/sound/default.nix+1−1
@@ -27,7 +27,7 @@ stdenv.mkDerivation rec {
27
27
28 passthru = {
28 passthru = {
29 updateScript = pantheon.updateScript {
29 updateScript = pantheon.updateScript {
30− repoName = pname;
30+ attrPath = "pantheon.${pname}";
31 };
31 };
32 };
32 };
33
33
pkgs/desktops/pantheon/apps/switchboard/default.nix+1−1
@@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
28
28
29 passthru = {
29 passthru = {
30 updateScript = pantheon.updateScript {
30 updateScript = pantheon.updateScript {
31− repoName = pname;
31+ attrPath = "pantheon.${pname}";
32 };
32 };
33 };
33 };
34
34
pkgs/desktops/pantheon/artwork/elementary-gtk-theme/default.nix+1−2
@@ -21,8 +21,7 @@ stdenv.mkDerivation rec {
21
21
22 passthru = {
22 passthru = {
23 updateScript = pantheon.updateScript {
23 updateScript = pantheon.updateScript {
24− inherit repoName;
25− attrPath = pname;
24+ attrPath = "pantheon.${pname}";
26 };
25 };
27 };
26 };
28
27
pkgs/desktops/pantheon/artwork/elementary-icon-theme/default.nix+1−2
@@ -23,8 +23,7 @@ stdenv.mkDerivation rec {
23
23
24 passthru = {
24 passthru = {
25 updateScript = pantheon.updateScript {
25 updateScript = pantheon.updateScript {
26− inherit repoName;
27− attrPath = pname;
26+ attrPath = "pantheon.${pname}";
28 };
27 };
29 };
28 };
30
29
pkgs/desktops/pantheon/artwork/elementary-sound-theme/default.nix+6−7
@@ -19,19 +19,18 @@ stdenv.mkDerivation rec {
19 sha256 = "1dc583lq61c361arjl3s44d2k72c46bqvcqv1c3s69f2ndsnxjdz";
19 sha256 = "1dc583lq61c361arjl3s44d2k72c46bqvcqv1c3s69f2ndsnxjdz";
20 };
20 };
21
21
22− passthru = {
23− updateScript = pantheon.updateScript {
24− inherit repoName;
25− attrPath = pname;
26− };
27− };
28−
29 nativeBuildInputs = [
22 nativeBuildInputs = [
30 meson
23 meson
31 ninja
24 ninja
32 pkgconfig
25 pkgconfig
33 ];
26 ];
34
27
28+ passthru = {
29+ updateScript = pantheon.updateScript {
30+ attrPath = "pantheon.${pname}";
31+ };
32+ };
33+
35 meta = with stdenv.lib; {
34 meta = with stdenv.lib; {
36 description = "A set of system sounds for elementary";
35 description = "A set of system sounds for elementary";
37 homepage = https://github.com/elementary/sound-theme;
36 homepage = https://github.com/elementary/sound-theme;
pkgs/desktops/pantheon/artwork/elementary-wallpapers/default.nix+1−2
@@ -27,8 +27,7 @@ stdenv.mkDerivation rec {
27
27
28 passthru = {
28 passthru = {
29 updateScript = pantheon.updateScript {
29 updateScript = pantheon.updateScript {
30− inherit repoName;
31− attrPath = pname;
30+ attrPath = "pantheon.${pname}";
32 };
31 };
33 };
32 };
34
33
pkgs/desktops/pantheon/default.nix+2
@@ -54,6 +54,8 @@ lib.makeScope pkgs.newScope (self: with self; {
54 wingpanel-indicator-session wingpanel-indicator-sound
54 wingpanel-indicator-session wingpanel-indicator-sound
55 ];
55 ];
56
56
57+ nixpkgs-github-update = callPackage ./nixpkgs_github_update { };
58+
57 updateScript = callPackage ./update.nix { };
59 updateScript = callPackage ./update.nix { };
58
60
59 maintainers = with pkgs.stdenv.lib.maintainers; [ worldofpeace ];
61 maintainers = with pkgs.stdenv.lib.maintainers; [ worldofpeace ];
pkgs/desktops/pantheon/desktop/elementary-default-settings/default.nix+1−2
@@ -27,8 +27,7 @@ stdenv.mkDerivation rec {
27
27
28 passthru = {
28 passthru = {
29 updateScript = pantheon.updateScript {
29 updateScript = pantheon.updateScript {
30− inherit repoName;
31− attrPath = pname;
30+ attrPath = "pantheon.${pname}";
32 };
31 };
33 };
32 };
34
33
pkgs/desktops/pantheon/desktop/elementary-greeter/default.nix+1−2
@@ -41,8 +41,7 @@ stdenv.mkDerivation rec {
41
41
42 passthru = {
42 passthru = {
43 updateScript = pantheon.updateScript {
43 updateScript = pantheon.updateScript {
44− inherit repoName;
45− attrPath = pname;
44+ attrPath = "pantheon.${pname}";
46 };
45 };
47
46
48 xgreeters = linkFarm "pantheon-greeter-xgreeters" [{
47 xgreeters = linkFarm "pantheon-greeter-xgreeters" [{
pkgs/desktops/pantheon/desktop/elementary-onboarding/default.nix+1−2
@@ -33,8 +33,7 @@ stdenv.mkDerivation rec {
33
33
34 passthru = {
34 passthru = {
35 updateScript = pantheon.updateScript {
35 updateScript = pantheon.updateScript {
36− inherit repoName;
37− attrPath = pname;
36+ attrPath = "pantheon.${pname}";
38 };
37 };
39 };
38 };
40
39
pkgs/desktops/pantheon/desktop/elementary-print-shim/default.nix+1−2
@@ -23,8 +23,7 @@ stdenv.mkDerivation rec {
23
23
24 passthru = {
24 passthru = {
25 updateScript = pantheon.updateScript {
25 updateScript = pantheon.updateScript {
26− inherit repoName;
27− attrPath = pname;
26+ attrPath = "pantheon.${pname}";
28 };
27 };
29 };
28 };
30
29
pkgs/desktops/pantheon/desktop/elementary-session-settings/default.nix+1−2
@@ -128,8 +128,7 @@ stdenv.mkDerivation rec {
128
128
129 passthru = {
129 passthru = {
130 updateScript = pantheon.updateScript {
130 updateScript = pantheon.updateScript {
131− inherit repoName;
132− attrPath = pname;
131+ attrPath = "pantheon.${pname}";
133 };
132 };
134 providedSessions = [ "pantheon" ];
133 providedSessions = [ "pantheon" ];
135 };
134 };
pkgs/desktops/pantheon/desktop/elementary-shortcut-overlay/default.nix+1−2
@@ -30,8 +30,7 @@ stdenv.mkDerivation rec {
30
30
31 passthru = {
31 passthru = {
32 updateScript = pantheon.updateScript {
32 updateScript = pantheon.updateScript {
33− inherit repoName;
34− attrPath = pname;
33+ attrPath = "pantheon.${pname}";
35 };
34 };
36 };
35 };
37
36
pkgs/desktops/pantheon/desktop/gala/default.nix+1−2
@@ -37,8 +37,7 @@ stdenv.mkDerivation rec {
37
37
38 passthru = {
38 passthru = {
39 updateScript = pantheon.updateScript {
39 updateScript = pantheon.updateScript {
40− repoName = pname;
40+ attrPath = "pantheon.${pname}";
41− versionPolicy = "master";
42 };
41 };
43 };
42 };
44
43
pkgs/desktops/pantheon/desktop/wingpanel-indicators/applications-menu/default.nix+1−2
@@ -39,8 +39,7 @@ stdenv.mkDerivation rec {
39
39
40 passthru = {
40 passthru = {
41 updateScript = pantheon.updateScript {
41 updateScript = pantheon.updateScript {
42− inherit repoName;
43− attrPath = pname;
42+ attrPath = "pantheon.${pname}";
44 };
43 };
45 };
44 };
46
45
pkgs/desktops/pantheon/desktop/wingpanel-indicators/bluetooth/default.nix+1−1
@@ -27,7 +27,7 @@ stdenv.mkDerivation rec {
27
27
28 passthru = {
28 passthru = {
29 updateScript = pantheon.updateScript {
29 updateScript = pantheon.updateScript {
30− repoName = pname;
30+ attrPath = "pantheon.${pname}";
31 };
31 };
32 };
32 };
33
33
pkgs/desktops/pantheon/desktop/wingpanel-indicators/datetime/default.nix+1−1
@@ -31,7 +31,7 @@ stdenv.mkDerivation rec {
31
31
32 passthru = {
32 passthru = {
33 updateScript = pantheon.updateScript {
33 updateScript = pantheon.updateScript {
34− repoName = pname;
34+ attrPath = "pantheon.${pname}";
35 };
35 };
36 };
36 };
37
37
pkgs/desktops/pantheon/desktop/wingpanel-indicators/keyboard/default.nix+1−1
@@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
28
28
29 passthru = {
29 passthru = {
30 updateScript = pantheon.updateScript {
30 updateScript = pantheon.updateScript {
31− repoName = pname;
31+ attrPath = "pantheon.${pname}";
32 };
32 };
33 };
33 };
34
34
pkgs/desktops/pantheon/desktop/wingpanel-indicators/network/default.nix+1−1
@@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
26
26
27 passthru = {
27 passthru = {
28 updateScript = pantheon.updateScript {
28 updateScript = pantheon.updateScript {
29− repoName = pname;
29+ attrPath = "pantheon.${pname}";
30 };
30 };
31 };
31 };
32
32
pkgs/desktops/pantheon/desktop/wingpanel-indicators/nightlight/default.nix+1−1
@@ -25,7 +25,7 @@ stdenv.mkDerivation rec {
25
25
26 passthru = {
26 passthru = {
27 updateScript = pantheon.updateScript {
27 updateScript = pantheon.updateScript {
28− repoName = pname;
28+ attrPath = "pantheon.${pname}";
29 };
29 };
30 };
30 };
31
31
pkgs/desktops/pantheon/desktop/wingpanel-indicators/notifications/default.nix+1−1
@@ -25,7 +25,7 @@ stdenv.mkDerivation rec {
25
25
26 passthru = {
26 passthru = {
27 updateScript = pantheon.updateScript {
27 updateScript = pantheon.updateScript {
28− repoName = pname;
28+ attrPath = "pantheon.${pname}";
29 };
29 };
30 };
30 };
31
31
pkgs/desktops/pantheon/desktop/wingpanel-indicators/power/default.nix+1−1
@@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
28
28
29 passthru = {
29 passthru = {
30 updateScript = pantheon.updateScript {
30 updateScript = pantheon.updateScript {
31− repoName = pname;
31+ attrPath = "pantheon.${pname}";
32 };
32 };
33 };
33 };
34
34
pkgs/desktops/pantheon/desktop/wingpanel-indicators/session/default.nix+1−1
@@ -25,7 +25,7 @@ stdenv.mkDerivation rec {
25
25
26 passthru = {
26 passthru = {
27 updateScript = pantheon.updateScript {
27 updateScript = pantheon.updateScript {
28− repoName = pname;
28+ attrPath = "pantheon.${pname}";
29 };
29 };
30 };
30 };
31
31
pkgs/desktops/pantheon/desktop/wingpanel-indicators/sound/default.nix+1−1
@@ -29,7 +29,7 @@ stdenv.mkDerivation rec {
29
29
30 passthru = {
30 passthru = {
31 updateScript = pantheon.updateScript {
31 updateScript = pantheon.updateScript {
32− repoName = pname;
32+ attrPath = "pantheon.${pname}";
33 };
33 };
34 };
34 };
35
35
pkgs/desktops/pantheon/desktop/wingpanel/default.nix+1−1
@@ -31,7 +31,7 @@ stdenv.mkDerivation rec {
31
31
32 passthru = {
32 passthru = {
33 updateScript = pantheon.updateScript {
33 updateScript = pantheon.updateScript {
34− repoName = pname;
34+ attrPath = "pantheon.${pname}";
35 };
35 };
36 };
36 };
37
37
pkgs/desktops/pantheon/granite/default.nix+1−1
@@ -27,7 +27,7 @@ stdenv.mkDerivation rec {
27
27
28 passthru = {
28 passthru = {
29 updateScript = pantheon.updateScript {
29 updateScript = pantheon.updateScript {
30− repoName = pname;
30+ attrPath = "pantheon.${pname}";
31 };
31 };
32 };
32 };
33
33
pkgs/desktops/pantheon/nixpkgs_github_update/.envrcnew file+1
@@ -0,0 +1 @@
1+use nix
pkgs/desktops/pantheon/nixpkgs_github_update/.formatter.exsnew file+4
@@ -0,0 +1,4 @@
1+# Used by "mix format"
2+[
3+ inputs: ["{mix,.formatter}.exs", "{config,lib,test}/**/*.{ex,exs}"]
4+]
pkgs/desktops/pantheon/nixpkgs_github_update/.gitignorenew file+32
@@ -0,0 +1,32 @@
1+# The directory Mix will write compiled artifacts to.
2+_build/
3+
4+# If you run "mix test --cover", coverage assets end up here.
5+cover/
6+
7+# The directory Mix downloads your dependencies sources to.
8+deps/
9+
10+# Where third-party dependencies like ExDoc output generated docs.
11+doc/
12+
13+# Ignore .fetch files in case you like to edit your project deps locally.
14+.fetch
15+
16+# If the VM crashes, it generates a dump, let's ignore it too.
17+erl_crash.dump
18+
19+# Also ignore archive artifacts (built via "mix archive.build").
20+*.ez
21+
22+# Ignore package tarball (built via "mix hex.build").
23+nixpkgs_github_update-*.tar
24+
25+# Ignore elixir_ls
26+.elixir_ls
27+
28+# mix escript.build result
29+nixpkgs_github_update
30+
31+# lockfile. only because this is nixpkgs.
32+mix.lock
pkgs/desktops/pantheon/nixpkgs_github_update/default.nixnew file+53
@@ -0,0 +1,53 @@
1+{ lib
2+, beamPackages
3+, makeWrapper
4+, common-updater-scripts
5+}:
6+
7+let
8+
9+ poison_4 = beamPackages.buildMix {
10+ name = "poison";
11+ version = "4.0.1";
12+
13+ src = beamPackages.fetchHex {
14+ pkg = "poison";
15+ version = "4.0.1";
16+ sha256 = "098gdz7xzfmnjzgnnv80nl4h3zl8l9czqqd132vlnfabxbz3d25s";
17+ };
18+ };
19+
20+
21+in
22+
23+beamPackages.buildMix {
24+ name = "nixpkgs-github-update";
25+ version = "0.1.0";
26+
27+ src = lib.cleanSource ./.;
28+
29+ nativeBuildInputs = [
30+ makeWrapper
31+ ];
32+
33+ beamDeps = with beamPackages; [ erlang poison_4 ];
34+
35+ buildPhase = ''
36+ export HEX_OFFLINE=1
37+ export HEX_HOME=`pwd`
38+ export MIX_ENV=prod
39+ export MIX_NO_DEPS=1
40+
41+ mix escript.build --no-deps-check
42+ '';
43+
44+ installPhase = ''
45+ mkdir -p $out/bin
46+ cp nixpkgs_github_update $out/bin
47+ '';
48+
49+ postFixup = ''
50+ wrapProgram $out/bin/nixpkgs_github_update \
51+ --prefix PATH : "${lib.makeBinPath [ common-updater-scripts ]}"
52+ '';
53+}
pkgs/desktops/pantheon/nixpkgs_github_update/lib/nixpkgs_github_update/cli.exnew file+71
@@ -0,0 +1,71 @@
1+defmodule NixpkgsGitHubUpdate.CLI do
2+ @moduledoc """
3+ Run updates on Nix Expressions that use fetchFromGitHub.
4+
5+ Arguments the script accepts:
6+ --attribute <attribute_path>
7+
8+ Example usage:
9+ ```
10+ ./nixpkgs_github_update --attribute "notes-up"
11+ ```
12+ """
13+ alias NixpkgsGitHubUpdate.{Nix, GitHubLatestVersion}
14+
15+ def help do
16+ IO.puts("""
17+ Run updates on Nix Expressions that use fetchFromGitHub.
18+
19+ Arguments the script accepts:
20+ --attribute <attribute_path>
21+
22+ Example usage:
23+ ./nixpkgs_github_update --attribute "notes-up"
24+ """)
25+ end
26+
27+ def main([]) do
28+ help()
29+ end
30+
31+ def main(args) do
32+ opts = parse_args(args)
33+
34+ attribute = opts[:attribute]
35+
36+ case Nix.attribute_exists?(attribute) do
37+ true -> update(attribute)
38+ _ -> exit("Requested attribute doesn't exist.")
39+ end
40+ end
41+
42+ def parse_args(args) do
43+ {options, _, _} =
44+ args
45+ |> OptionParser.parse(strict: [attribute: :string])
46+
47+ options
48+ end
49+
50+ def update(attribute) do
51+ version =
52+ Nix.get_owner_repo(attribute)
53+ |> GitHubLatestVersion.fetch()
54+ |> decode_response()
55+ |> construct_version()
56+
57+ Nix.update_source_version(attribute, version)
58+ end
59+
60+ def decode_response({:ok, response}), do: response
61+
62+ def decode_response({:error, error}) do
63+ IO.puts("Error getting latest release from GitHub: #{error["message"]}")
64+ System.halt(2)
65+ end
66+
67+ def construct_version(response) do
68+ Map.get(response, "tag_name")
69+ |> String.trim_leading("v")
70+ end
71+end
pkgs/desktops/pantheon/nixpkgs_github_update/lib/nixpkgs_github_update/github_latest_version.exnew file+31
@@ -0,0 +1,31 @@
1+defmodule NixpkgsGitHubUpdate.GitHubLatestVersion do
2+ @user_agent 'httpc'
3+
4+ def fetch({owner, repo}) do
5+ endpoint = releases_endpoint(owner, repo)
6+
7+ oauth_token = String.to_charlist("#{System.get_env("OAUTH_TOKEN")}")
8+
9+ headers = %{
10+ 'User-Agent' => @user_agent,
11+ 'Authorization' => 'token #{oauth_token}'
12+ }
13+
14+ :httpc.request(:get, {endpoint, Map.to_list(headers)}, [], [])
15+ |> handle_response
16+ end
17+
18+ def releases_endpoint(owner, repo) do
19+ 'https://api.github.com/repos/#{owner}/#{repo}/releases/latest'
20+ end
21+
22+ def handle_response({_, {{_httpv, status_code, _}, _headers, response}}) do
23+ {
24+ status_code |> check_for_error(),
25+ response |> Poison.Parser.parse!(%{})
26+ }
27+ end
28+
29+ defp check_for_error(200), do: :ok
30+ defp check_for_error(_), do: :error
31+end
pkgs/desktops/pantheon/nixpkgs_github_update/lib/nixpkgs_github_update/nix.exnew file+75
@@ -0,0 +1,75 @@
1+defmodule NixpkgsGitHubUpdate.Nix do
2+ def executable do
3+ nix = System.find_executable("nix")
4+
5+ if nil === nix do
6+ raise RuntimeError, message: "missing executable for 'nix'"
7+ end
8+
9+ nix
10+ end
11+
12+ def eval!(attribute) do
13+ System.cmd(
14+ executable(),
15+ [
16+ "eval",
17+ "--json",
18+ attribute
19+ ],
20+ stderr_to_stdout: true
21+ )
22+ |> handle_eval
23+ end
24+
25+ def handle_eval({eval_result, 0}) do
26+ case eval_result do
27+ "" -> eval_result
28+ _ -> Poison.Parser.parse!(eval_result, %{})
29+ end
30+ end
31+
32+ def handle_eval({eval_result, _}) do
33+ IO.puts("Error running nix eval: #{eval_result}")
34+ end
35+
36+ def attribute_exists?(attribute) do
37+ eval!("(with import <nixpkgs> {}; lib.isDerivation #{attribute})")
38+ end
39+
40+ def update_source_version(attribute, version) do
41+ System.cmd("update-source-version", [
42+ attribute,
43+ version
44+ ])
45+ end
46+
47+ def get_url_attr(attribute) do
48+ case eval!("nixpkgs.#{attribute}.src.fetchSubmodules") do
49+ true -> "url"
50+ _ -> "urls"
51+ end
52+ end
53+
54+ def get_owner_repo(attribute) do
55+ url_attr = get_url_attr(attribute)
56+
57+ eval!("nixpkgs.#{attribute}.src.#{url_attr}")
58+ |> case do
59+ # It's fetchFromGitHub if we got a list
60+ [url | _] ->
61+ URI.parse(url).path
62+ |> String.split("/archive", trim: true)
63+ |> List.first()
64+ |> String.split("/", trim: true)
65+
66+ # It's fetchgit if we got a plain string
67+ url ->
68+ URI.parse(url).path
69+ |> String.split(".git", trim: true)
70+ |> List.first()
71+ |> String.split("/", trim: true)
72+ end
73+ |> List.to_tuple()
74+ end
75+end
pkgs/desktops/pantheon/nixpkgs_github_update/mix.exsnew file+28
@@ -0,0 +1,28 @@
1+defmodule NixpkgsGitHubUpdate.MixProject do
2+ use Mix.Project
3+
4+ def project do
5+ [
6+ app: :nixpkgs_github_update,
7+ version: "0.1.0",
8+ elixir: "~> 1.9",
9+ escript: [main_module: NixpkgsGitHubUpdate.CLI],
10+ start_permanent: Mix.env() == :prod,
11+ deps: deps()
12+ ]
13+ end
14+
15+ # Run "mix help compile.app" to learn about applications.
16+ def application do
17+ [
18+ extra_applications: [:logger, :inets, :ssl]
19+ ]
20+ end
21+
22+ # Run "mix help deps" to learn about dependencies.
23+ defp deps do
24+ [
25+ {:poison, "~> 4.0.1"}
26+ ]
27+ end
28+end
pkgs/desktops/pantheon/nixpkgs_github_update/shell.nixnew file+19
@@ -0,0 +1,19 @@
1+with import <nixpkgs> {};
2+
3+let
4+ inherit (lib) optional;
5+in
6+
7+mkShell rec {
8+ name = "nixpkgs-github-update-shell";
9+
10+ buildInputs = [
11+ elixir
12+ erlang
13+ common-updater-scripts
14+ ]
15+ ++ optional stdenv.isLinux libnotify # For ExUnit Notifier on Linux.
16+ ++ optional stdenv.isLinux inotify-tools # For file_system on Linux.
17+ ;
18+
19+}
pkgs/desktops/pantheon/services/cerbere/default.nix+1−1
@@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
24
24
25 passthru = {
25 passthru = {
26 updateScript = pantheon.updateScript {
26 updateScript = pantheon.updateScript {
27− repoName = pname;
27+ attrPath = "pantheon.${pname}";
28 };
28 };
29 };
29 };
30
30
pkgs/desktops/pantheon/services/contractor/default.nix+1−1
@@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
26
26
27 passthru = {
27 passthru = {
28 updateScript = pantheon.updateScript {
28 updateScript = pantheon.updateScript {
29− repoName = pname;
29+ attrPath = "pantheon.${pname}";
30 };
30 };
31 };
31 };
32
32
pkgs/desktops/pantheon/services/elementary-capnet-assist/default.nix+1−2
@@ -30,8 +30,7 @@ stdenv.mkDerivation rec {
30
30
31 passthru = {
31 passthru = {
32 updateScript = pantheon.updateScript {
32 updateScript = pantheon.updateScript {
33− inherit repoName;
34− attrPath = pname;
33+ attrPath = "pantheon.${pname}";
35 };
34 };
36 };
35 };
37
36
pkgs/desktops/pantheon/services/elementary-dpms-helper/default.nix+1−2
@@ -25,8 +25,7 @@ stdenv.mkDerivation rec {
25
25
26 passthru = {
26 passthru = {
27 updateScript = pantheon.updateScript {
27 updateScript = pantheon.updateScript {
28− inherit repoName;
29− attrPath = pname;
28+ attrPath = "pantheon.${pname}";
30 };
29 };
31 };
30 };
32
31
pkgs/desktops/pantheon/services/pantheon-agent-geoclue2/default.nix+1−1
@@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
26
26
27 passthru = {
27 passthru = {
28 updateScript = pantheon.updateScript {
28 updateScript = pantheon.updateScript {
29− repoName = pname;
29+ attrPath = "pantheon.${pname}";
30 };
30 };
31 };
31 };
32
32
pkgs/desktops/pantheon/services/pantheon-agent-polkit/default.nix+1−1
@@ -25,7 +25,7 @@ stdenv.mkDerivation rec {
25
25
26 passthru = {
26 passthru = {
27 updateScript = pantheon.updateScript {
27 updateScript = pantheon.updateScript {
28− repoName = pname;
28+ attrPath = "pantheon.${pname}";
29 };
29 };
30 };
30 };
31
31
pkgs/desktops/pantheon/update.nix+3−33
@@ -1,36 +1,6 @@
1−{ runCommand
1+{ nixpkgs-github-update }:
2−, nix
3−, bash
4−, git
5−, jq
6−, nix-prefetch-scripts
7−, coreutils
8−, common-updater-scripts
9−, gnugrep
10−, gnused
11−, curl
12−}:
13
2
14−{ repoName
15−, attrPath ? repoName
3+{ attrPath }:
16−, versionPolicy ? "release"
17−}:
18
4
19−let
20− script = ./update.sh;
21
5
22− updateScript = runCommand "update.sh" {
6+[ "${nixpkgs-github-update}/bin/nixpkgs_github_update" "--attribute" attrPath ]
23− inherit bash git jq nix coreutils gnugrep gnused curl;
24− # These weren't being substituted
25− nix_prefetch_scripts = nix-prefetch-scripts;
26− common_updater_scripts = common-updater-scripts;
27− } ''
28− substituteAll ${script} $out
29− chmod +x $out
30− '';
31−
32− throwFlag = throw "${versionPolicy} is not a valid versionPolicy - Options are either 'release' or 'master' (defaults to release).";
33−
34− versionFlag = { release = "-r"; master = "-m"; }.${versionPolicy} or throwFlag;
35−
36−in [ updateScript versionFlag repoName attrPath ]
pkgs/desktops/pantheon/update.shdeleted−236
@@ -1,236 +0,0 @@
1−#!@bash@/bin/bash
2−PATH=@bash@/bin:@nix_prefetch_scripts@/bin:@common_updater_scripts@/bin:@git@/bin:@jq@/bin:@nix@/bin:@gnugrep@/bin:@gnused@/bin:@curl@/bin:$PATH
3−#!/usr/bin/env bash
4−
5−set -eu -o pipefail
6−
7−#
8−# ─── HOW TO USE ─────────────────────────────────────────────────────────────────
9−#
10−
11−function usage ( ) {
12− cat <<EOF
13−Usage: update.sh <repo_name> <attr>
14−EOF
15−}
16−
17−#
18−# ─── POINTS YOU IN THE RIGHT DIRECTION ──────────────────────────────────────────
19−#
20−
21− function usage_tip ( ) {
22− echo 'run `update.sh -h` for usage instructions' >&2
23− exit 1
24− }
25−
26−#
27−# ─── OPTIONS: RELEASE | MASTER ────────────────────────────────────────────────────
28−#
29−
30− while getopts ":hrm" opt; do
31− case $opt in
32− r)
33− release=1
34− master=0
35− ;;
36− m)
37− master=1
38− release=0
39− ;;
40− h)
41− usage
42− exit
43− ;;
44− ?)
45− echo "Invalid option: -$OPTARG" >&2
46− usage_tip
47− ;;
48− esac
49− done
50−
51− shift $((OPTIND-1))
52−
53−#
54−# ─── FAIL WITH MESSAGE AND NON-ZERO EXIT STATUS ─────────────────────────────────
55−#
56−
57− function fail ( ) {
58− echo "$1" >&2
59− exit 1
60− }
61−
62−#
63−# ─── UPDATES PACKAGE TO LATEST TAGGED RELEASE ───────────────────────────────
64−#
65−
66− function update_to_latest_release ( ) {
67− repo_name="$1"
68− attr="$2"
69−
70− version=$(get_latest_tag "$repo_name")
71− fetch=$(fetch "$repo_name" "refs/tags/${version}")
72− sha256=$(get_hash "${fetch}")
73−
74− update-source-version "pantheon.$attr" "$version" "$sha256"
75−
76− nix_file=$(get_file_path $attr)
77−
78− if [ ! -f "$nix_file" ]; then
79− fail "Couldn't evaluate 'pantheon.$attr.meta.position' to locate the .nix file!"
80− fi
81−
82− correct_rev "$attr" "$nix_file" "version"
83− }
84−
85−#
86−# ─── UPDATES PACKAGE TO MASTER ──────────────────────────────────────────────────
87−#
88−
89− function update_to_master ( ) {
90− repo_name="$1"
91− attr="$2"
92−
93− fetch=$(fetch "$repo_name" "refs/heads/master")
94−
95− version=$(get_version "$fetch")
96− sha256=$(get_hash "$fetch")
97− proper_version=$(get_master_date "$fetch")
98−
99− update-source-version "pantheon.$attr" "$proper_version" "$sha256"
100−
101− nix_file=$(get_file_path $attr)
102−
103− if [ ! -f "$nix_file" ]; then
104− fail "Couldn't evaluate 'pantheon.$attr.meta.position' to locate the .nix file!"
105− fi
106−
107− correct_rev "$attr" "$nix_file" '"'$version'"'
108− }
109−
110−#
111−# ─── GETS THE LATEST TAGGED RELEASE NAME FROM GITHUB ─────────────────────
112−#
113−
114− function get_latest_tag ( ) {
115− repo_name="$1"
116−
117− OAUTH_TOKEN=$(printenv OAUTH_TOKEN)
118−
119− if [ -n "$OAUTH_TOKEN" ]; then
120− curl \
121− --silent \
122− --show-error \
123− --fail \
124− -X GET \
125− --header "Authorization: token $OAUTH_TOKEN" \
126− "https://api.github.com/repos/elementary/$repo_name/releases/latest" \
127− | jq -r '.tag_name'
128− else
129− curl \
130− --silent \
131− --show-error \
132− --fail \
133− -X GET \
134− "https://api.github.com/repos/elementary/$repo_name/releases/latest" \
135− | jq -r '.tag_name'
136− fi
137− }
138−
139−#
140−# ─── FETCHES REPO AND RETURNS RELEVANT INFORMATION ──────────────────
141−#
142−
143− function fetch ( ) {
144− repo_name="$1"
145− version="$2"
146−
147− base_url="https://github.com/elementary"
148− full_url="$base_url/$repo_name"
149−
150− nix-prefetch-git --quiet --no-deepClone --url "$full_url" --rev "$version"
151− }
152−
153−#
154−# ─── PARSES GIT REVISION FROM FETCH ─────────────────────────────────────────────
155−#
156−
157− function get_version ( ) {
158− fetch_info="$1"
159−
160− echo "$fetch_info" | jq -r '.rev'
161− }
162−
163−#
164−# ─── PARSES HASH FROM FETCH ─────────────────────────────────────────────────────
165−#
166−
167− function get_hash ( ) {
168− fetch_info="$1"
169−
170− echo "$fetch_info" | jq -r '.sha256'
171− }
172−
173−#
174−# ─── PARSES DATE FROM FETCH AND NORMALIZES IT TO NIXPKGS STANDARD ───────────────
175−#
176−
177− function get_master_date ( ) {
178− fetch_info="$1"
179−
180− full_date=$(echo "$fetch_info" | jq -r '.date')
181− short_date=$(date -d "$full_date" +"%Y-%m-%d")
182−
183− echo "unstable-$short_date"
184− }
185−
186−#
187−# ─── RETURN NIX EXPRESSION PATH ─────────────────────────────────────────────────
188−#
189−
190− function get_file_path () {
191− attr="$1"
192−
193− nix-instantiate --eval --strict -A "pantheon.$attr.meta.position" | sed -re 's/^"(.*):[0-9]+"$/\1/'
194− }
195−
196−#
197−# ─── CORRECTS REV VERSION ───────────────────────────────────────────────────────────
198−#
199−
200− function correct_rev ( ) {
201− attr="$1"
202− nix_file="$2"
203− rev="$3"
204−
205− check_pattern1='^\s*rev\s*=\s*"[0-9a-f]{5,40}"'
206− check_pattern2='^\s*rev\s*=\s*version'
207−
208− replace_pattern1='/\brev\b\s*=/ s|\"[0-9a-f]{5,40}\"|'$rev'|'
209− replace_pattern2='/\brev\b\s*=/ s|version|'$rev'|'
210−
211− if [ $(grep -c -P "$check_pattern1" "$nix_file") = 1 ]; then
212− pattern="$replace_pattern1"
213− elif [ $(grep -c -P "$check_pattern2" "$nix_file") = 1 ]; then
214− pattern="$replace_pattern2"
215− else
216− fail "Couldn't figure out where out where to patch in the correct version in pantheon.$attr!"
217− fi
218−
219− sed -i.bak "$nix_file" -re "$pattern"
220− rm -f "$nix_file.bak"
221− }
222−
223−
224−#
225−# ─── WHETHER TO UPDATE TO RELEASE OR MASTER ──────────────────────────────────
226−#
227−
228− if [ $release = 1 ]; then
229− update_to_latest_release $1 $2
230− elif [ $master = 1 ]; then
231− update_to_master $1 $2
232− else
233− exit 1
234− fi
235−
236−# ────────────────────────────────────────────────────────────────────────────────