From 458bcc8f7a95874afc21cc58ddef6e87d9924d5a Mon Sep 17 00:00:00 2001 From: Brian Olsen Date: Mon, 26 Feb 2018 23:57:44 +0100 Subject: [PATCH 001/371] nixos/rspamd: Preserve runtime directory when using socket activation --- nixos/modules/services/mail/rspamd.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nixos/modules/services/mail/rspamd.nix b/nixos/modules/services/mail/rspamd.nix index 09fb587e74b..a88a8997c3a 100644 --- a/nixos/modules/services/mail/rspamd.nix +++ b/nixos/modules/services/mail/rspamd.nix @@ -308,6 +308,7 @@ in ExecStart = "${pkgs.rspamd}/bin/rspamd ${optionalString cfg.debug "-d"} --user=${cfg.user} --group=${cfg.group} --pid=/run/rspamd.pid -c ${rspamdConfFile} -f"; Restart = "always"; RuntimeDirectory = "rspamd"; + RuntimeDirectoryPreserve = mkIf cfg.socketActivation true; PrivateTmp = true; Sockets = mkIf cfg.socketActivation (concatStringsSep " " allSocketNames); }; From e12871912ec630597eecd4983f6f33c444e836b4 Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Tue, 21 Aug 2018 16:58:13 -0500 Subject: [PATCH 002/371] patchelf: 0.10-pre-20180108 -> 0.10-pre-20180509, minor touchup Useful update-- adds support for accepting multiple files as arguments and fixes handling of large executables (>2Gb). While touching this, modify version to include more info. Preserving version format previously used, although not usual style. --- pkgs/development/tools/misc/patchelf/unstable.nix | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/pkgs/development/tools/misc/patchelf/unstable.nix b/pkgs/development/tools/misc/patchelf/unstable.nix index de68a4066d7..8f4194d8973 100644 --- a/pkgs/development/tools/misc/patchelf/unstable.nix +++ b/pkgs/development/tools/misc/patchelf/unstable.nix @@ -1,19 +1,24 @@ { stdenv, fetchFromGitHub, autoreconfHook }: stdenv.mkDerivation rec { - name = "patchelf-0.10-pre-20180108"; + name = "patchelf-${version}"; + version = "0.10-pre-20180509"; src = fetchFromGitHub { owner = "NixOS"; repo = "patchelf"; - rev = "48452cf6b4ccba1c1f47a09f4284a253634ab7d1"; - sha256 = "1f1s8q3as3nrhcc1a8qc2z7imm644jfz44msn9sfv4mdynp2m2yb"; + rev = "27ffe8ae871e7a186018d66020ef3f6162c12c69"; + sha256 = "1sfkqsvwqqm2kdgkiddrxni86ilbrdw5my29szz81nj1m2j16asr"; }; # Drop test that fails on musl (?) postPatch = stdenv.lib.optionalString stdenv.hostPlatform.isMusl '' substituteInPlace tests/Makefile.am \ --replace "set-rpath-library.sh" "" + '' + + # extend version identifier to more informative than "0.10". + '' + echo -n ${version} > version ''; setupHook = [ ./setup-hook.sh ]; From 7bf9b4256e1f0d9d0d7f82c0b85a5afc3a002748 Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Tue, 21 Aug 2018 19:06:45 -0500 Subject: [PATCH 003/371] patchelfUnstable: disable tests on Darwin since they've long failed Bit of context/discussion: https://github.com/NixOS/nixpkgs/pull/45449#issuecomment-414844592 --- pkgs/development/tools/misc/patchelf/unstable.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/tools/misc/patchelf/unstable.nix b/pkgs/development/tools/misc/patchelf/unstable.nix index 8f4194d8973..0c5ec640426 100644 --- a/pkgs/development/tools/misc/patchelf/unstable.nix +++ b/pkgs/development/tools/misc/patchelf/unstable.nix @@ -26,7 +26,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ autoreconfHook ]; buildInputs = [ ]; - doCheck = true; + doCheck = !stdenv.isDarwin; meta = { homepage = https://nixos.org/patchelf.html; From 4a4fab3855a0e146db25253188727369ec373b75 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Wed, 5 Sep 2018 11:15:13 +0300 Subject: [PATCH 004/371] parity-beta: 2.0.1 -> 2.0.3 --- pkgs/applications/altcoins/parity/beta.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/altcoins/parity/beta.nix b/pkgs/applications/altcoins/parity/beta.nix index fe58579e6b5..fc772246cfc 100644 --- a/pkgs/applications/altcoins/parity/beta.nix +++ b/pkgs/applications/altcoins/parity/beta.nix @@ -1,7 +1,7 @@ let - version = "2.0.1"; - sha256 = "0rfq0izpswfwbyvr5kb6zjyf6sd7l1706c0sp7ccy6ykdfb4v6zs"; - cargoSha256 = "1ij17bfwvikqi5aj71j1nwf3jhkf3y9a0kwydajviwal47p9grl9"; + version = "2.0.3"; + sha256 = "1yf3ln4ksk8613kqkpsh16cj8xwx761q6czy57rs8kfh7pgc2pzb"; + cargoSha256 = "1jayk4ngwbg0rv7x1slkl2z46czgy2hnfcxc0dhaz4xpbp2bjqq8"; patches = [ ./patches/vendored-sources-2.0.patch ]; in import ./parity.nix { inherit version sha256 cargoSha256 patches; } From 5dff1d0ca4cb9f1dc1a32d4ccee20ef42a7081c1 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Thu, 6 Sep 2018 18:26:22 +0300 Subject: [PATCH 005/371] parity: 1.11.8 -> 1.11.10 --- pkgs/applications/altcoins/parity/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/altcoins/parity/default.nix b/pkgs/applications/altcoins/parity/default.nix index 993bc3615aa..234364e7336 100644 --- a/pkgs/applications/altcoins/parity/default.nix +++ b/pkgs/applications/altcoins/parity/default.nix @@ -1,6 +1,6 @@ let - version = "1.11.8"; - sha256 = "0qk5vl8ql3pr9pz5iz7whahwqi1fcbsf8kphn6z4grgc87id7b19"; + version = "1.11.10"; + sha256 = "15sk6dvc8h1bdm6v7xlq517km0bakb9f13h1n7ixj311vahnmk15"; cargoSha256 = "0p2idd36cyzp2ax81k533bdma4hz0ws2981qj2s7jnhvmj4941l8"; patches = [ ./patches/vendored-sources-1.11.patch ]; in From 68bdaad07801af50ae281579b21772bc0184267b Mon Sep 17 00:00:00 2001 From: Michiel Leenaars Date: Thu, 6 Sep 2018 21:56:05 +0200 Subject: [PATCH 006/371] hyperscrypt-font: init at 1.1 --- pkgs/data/fonts/hyperscrypt/default.nix | 40 +++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 42 insertions(+) create mode 100644 pkgs/data/fonts/hyperscrypt/default.nix diff --git a/pkgs/data/fonts/hyperscrypt/default.nix b/pkgs/data/fonts/hyperscrypt/default.nix new file mode 100644 index 00000000000..80516eb0293 --- /dev/null +++ b/pkgs/data/fonts/hyperscrypt/default.nix @@ -0,0 +1,40 @@ +{ stdenv, fetchzip, lib }: + +let + version = "1.1"; + pname = "HyperScrypt"; +in + +fetchzip rec { + name = "${lib.toLower pname}-font-${version}"; + url = "https://gitlab.com/StudioTriple/Hyper-Scrypt/-/archive/${version}/Hyper-Scrypt-${version}.zip"; + sha256 = "01pf5p2scmw02s0gxnibiwxbpzczphaaapv0v4s7svk9aw2gmc0m"; + postFetch = '' + mkdir -p $out/share/fonts/{truetype,opentype} + unzip -j $downloadedFile \*.ttf -d $out/share/fonts/truetype/${pname}.ttf + unzip -j $downloadedFile \*${pname}.otf -d $out/share/fonts/opentype/${pname}.otf + ''; + + meta = with stdenv.lib; { + homepage = http://velvetyne.fr/fonts/hyper-scrypt/; + description = "A modern stencil typeface inspired by stained glass technique"; + longDescription = '' + The Hyper Scrypt typeface was designed for the Hyper Chapelle + exhibition. It was commissioned by AAAAA Atelier to Studio + Triple's designer Jérémy Landes. Hyper Scrypt is a modern + stencil typeface inspired by the stained glass technique used in + the Metz cathedral. It borrows the stained glass method, drawing + holes for the light with black lead. This creates a reverse + typeface, where the shapes of the letters are drawn by their + counters. Hyper Scrypt is at the intersection between 3 metals : + the sacred lead of stained glass, the lead of print characters + and the heavy metal. Despite its organic look inherited for the + molted metal, Hyper Scrypt is based upon a rigorous grid, + allowing some neat alignements between shapes in multi lines + layouts. + ''; + license = licenses.ofl; + maintainers = with maintainers; [ leenaars ]; + platforms = platforms.all; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c8ff605bbd0..1fef7fba2ad 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -14939,6 +14939,8 @@ with pkgs; hanazono = callPackage ../data/fonts/hanazono { }; + hyperscrypt-font = callPackage ../data/fonts/hyperscrypt { }; + ia-writer-duospace = callPackage ../data/fonts/ia-writer-duospace { }; ibm-plex = callPackage ../data/fonts/ibm-plex { }; From fe0b5273cc9add01d97bfb5f35266f3027fd975d Mon Sep 17 00:00:00 2001 From: Jan Malakhovski Date: Sat, 8 Sep 2018 21:49:06 +0000 Subject: [PATCH 007/371] nixos/release.nix: make `makeNetboot` more like `makeIso` --- nixos/release.nix | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/nixos/release.nix b/nixos/release.nix index 0fd8d694641..167f2bca6b5 100644 --- a/nixos/release.nix +++ b/nixos/release.nix @@ -95,16 +95,19 @@ let buildFromConfig = module: sel: forAllSystems (system: hydraJob (sel (import ./lib/eval-config.nix { inherit system; - modules = [ module versionModule ] ++ singleton + modules = [ configuration module versionModule ] ++ singleton ({ ... }: { fileSystems."/".device = mkDefault "/dev/sda1"; boot.loader.grub.device = mkDefault "/dev/sda"; }); }).config)); - makeNetboot = config: + makeNetboot = { module, system, ... }: let - configEvaled = import lib/eval-config.nix config; + configEvaled = import lib/eval-config.nix { + inherit system; + modules = [ module versionModule ]; + }; build = configEvaled.config.system.build; kernelTarget = configEvaled.pkgs.stdenv.hostPlatform.platform.kernelTarget; in @@ -139,11 +142,8 @@ in rec { initialRamdisk = buildFromConfig ({ ... }: { }) (config: config.system.build.initialRamdisk); netboot = forMatchingSystems [ "x86_64-linux" "aarch64-linux" ] (system: makeNetboot { + module = ./modules/installer/netboot/netboot-minimal.nix; inherit system; - modules = [ - ./modules/installer/netboot/netboot-minimal.nix - versionModule - ]; }); iso_minimal = forAllSystems (system: makeIso { From c3593f359950f7013b163ed9d41e75fc79d39c3a Mon Sep 17 00:00:00 2001 From: Jan Malakhovski Date: Sat, 8 Sep 2018 21:49:08 +0000 Subject: [PATCH 008/371] nixos/release.nix: import lib once --- nixos/release.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nixos/release.nix b/nixos/release.nix index 167f2bca6b5..890ef73bb2c 100644 --- a/nixos/release.nix +++ b/nixos/release.nix @@ -1,10 +1,11 @@ -{ nixpkgs ? { outPath = (import ../lib).cleanSource ./..; revCount = 130979; shortRev = "gfedcba"; } +with import ../lib; + +{ nixpkgs ? { outPath = cleanSource ./..; revCount = 130979; shortRev = "gfedcba"; } , stableBranch ? false , supportedSystems ? [ "x86_64-linux" "aarch64-linux" ] }: with import ../pkgs/top-level/release-lib.nix { inherit supportedSystems; }; -with import ../lib; let From 4e5e240770ac2ccecccded59187202137b0c2177 Mon Sep 17 00:00:00 2001 From: Jan Malakhovski Date: Sat, 8 Sep 2018 21:49:12 +0000 Subject: [PATCH 009/371] nixos/release.nix: add `configuration` parameter --- nixos/release.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/nixos/release.nix b/nixos/release.nix index 890ef73bb2c..8032e0a88a8 100644 --- a/nixos/release.nix +++ b/nixos/release.nix @@ -3,6 +3,7 @@ with import ../lib; { nixpkgs ? { outPath = cleanSource ./..; revCount = 130979; shortRev = "gfedcba"; } , stableBranch ? false , supportedSystems ? [ "x86_64-linux" "aarch64-linux" ] +, configuration ? {} }: with import ../pkgs/top-level/release-lib.nix { inherit supportedSystems; }; @@ -52,7 +53,7 @@ let hydraJob ((import lib/eval-config.nix { inherit system; - modules = [ module versionModule { isoImage.isoBaseName = "nixos-${type}"; } ]; + modules = [ configuration module versionModule { isoImage.isoBaseName = "nixos-${type}"; } ]; }).config.system.build.isoImage); @@ -63,7 +64,7 @@ let hydraJob ((import lib/eval-config.nix { inherit system; - modules = [ module versionModule ]; + modules = [ configuration module versionModule ]; }).config.system.build.sdImage); @@ -76,7 +77,7 @@ let config = (import lib/eval-config.nix { inherit system; - modules = [ module versionModule ]; + modules = [ configuration module versionModule ]; }).config; tarball = config.system.build.tarball; From 14d98576045d566af5c3c5697181a12a80cceab7 Mon Sep 17 00:00:00 2001 From: Matthieu Coudron Date: Tue, 11 Sep 2018 17:29:27 +0900 Subject: [PATCH 010/371] pythonPackages.khard: zsh autocompletion 'cos that's cool --- pkgs/applications/misc/khard/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/applications/misc/khard/default.nix b/pkgs/applications/misc/khard/default.nix index 3c5184d5463..35c3c974849 100644 --- a/pkgs/applications/misc/khard/default.nix +++ b/pkgs/applications/misc/khard/default.nix @@ -40,6 +40,10 @@ in with python.pkgs; buildPythonApplication rec { unidecode ]; + postInstall = '' + install -D misc/zsh/_khard $out/share/zsh/site-functions/ + ''; + # Fails; but there are no tests anyway. doCheck = false; From d30c97096bf6c6faed7c5906ecb435a04f04871c Mon Sep 17 00:00:00 2001 From: Matthieu Coudron Date: Tue, 11 Sep 2018 18:48:19 +0900 Subject: [PATCH 011/371] gitAndTools.git-extras: install zsh completion because there are so many freaking commands ! --- .../version-management/git-and-tools/git-extras/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/applications/version-management/git-and-tools/git-extras/default.nix b/pkgs/applications/version-management/git-and-tools/git-extras/default.nix index 1ea60272c33..7b6dd8aacb4 100644 --- a/pkgs/applications/version-management/git-and-tools/git-extras/default.nix +++ b/pkgs/applications/version-management/git-and-tools/git-extras/default.nix @@ -13,6 +13,10 @@ stdenv.mkDerivation rec { installFlags = [ "DESTDIR=$(out) PREFIX=" ]; + postInstall = '' + install -D etc/git-extras-completion.zsh $out/share/zsh/site-functions/_git_extras + ''; + meta = with stdenv.lib; { homepage = https://github.com/tj/git-extras; description = "GIT utilities -- repo summary, repl, changelog population, author commit percentages and more"; From 525f4250739361892a30edb5aed6a8499d624d6e Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Tue, 11 Sep 2018 17:32:53 +0200 Subject: [PATCH 012/371] pdsh: set default module to ssh, remove obsolete fixes --- pkgs/tools/networking/pdsh/default.nix | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/pkgs/tools/networking/pdsh/default.nix b/pkgs/tools/networking/pdsh/default.nix index 9239b9e118d..812d335e808 100644 --- a/pkgs/tools/networking/pdsh/default.nix +++ b/pkgs/tools/networking/pdsh/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, perl, readline, rsh, ssh, pam }: +{ stdenv, fetchurl, perl, readline, rsh, ssh }: stdenv.mkDerivation rec { name = "pdsh-2.33"; @@ -8,12 +8,7 @@ stdenv.mkDerivation rec { sha256 = "0bwlkl9inj66iwvafg00pi3sk9n673phdi0kcc59y9nn55s0hs3k"; }; - buildInputs = [perl readline ssh pam]; - - /* pdsh uses pthread_cancel(), which requires libgcc_s.so.1 to be - loadable at run-time. Adding the flag below ensures that the - library can be found. Obviously, though, this is a hack. */ - NIX_LDFLAGS="-lgcc_s"; + buildInputs = [ perl readline ssh ]; preConfigure = '' configureFlagsArray=( @@ -22,11 +17,11 @@ stdenv.mkDerivation rec { "--with-machines=/etc/pdsh/machines" ${if readline == null then "--without-readline" else "--with-readline"} ${if ssh == null then "--without-ssh" else "--with-ssh"} - ${if pam == null then "--without-pam" else "--with-pam"} ${if rsh == false then "--without-rsh" else "--with-rsh"} "--with-dshgroups" "--with-xcpu" "--disable-debug" + '--with-rcmd-rank-list=ssh,krb4,exec,xcpu,rsh' ) ''; From 437bcdfed5579539dc660a0c4584a3a1eae27ca0 Mon Sep 17 00:00:00 2001 From: rembo10 Date: Thu, 13 Sep 2018 14:11:59 +0200 Subject: [PATCH 013/371] sickbeard: init at 2016-03-21 --- pkgs/servers/sickbeard/default.nix | 35 ++++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 37 insertions(+) create mode 100644 pkgs/servers/sickbeard/default.nix diff --git a/pkgs/servers/sickbeard/default.nix b/pkgs/servers/sickbeard/default.nix new file mode 100644 index 00000000000..4d6e181c61d --- /dev/null +++ b/pkgs/servers/sickbeard/default.nix @@ -0,0 +1,35 @@ +{ stdenv, fetchFromGitHub, python2, makeWrapper }: + +let + pythonEnv = python2.withPackages(ps: with ps; [ cheetah ]); +in python2.pkgs.buildPythonApplication rec { + name = "sickbeard-${version}"; + version = "2016-03-21"; + + src = fetchFromGitHub { + owner = "midgetspy"; + repo = "Sick-Beard"; + rev = "171a607e41b7347a74cc815f6ecce7968d9acccf"; + sha256 = "16bn13pvzl8w6nxm36ii724x48z1cnf8y5fl0m5ig1vpqfypk5vq"; + }; + + dontBuild = true; + doCheck = false; + + nativeBuildInputs = [ makeWrapper ]; + buildInputs = [ pythonEnv ]; + + installPhase = '' + mkdir -p $out/bin + cp -R {autoProcessTV,cherrypy,data,lib,sickbeard,SickBeard.py} $out/ + + makeWrapper $out/SickBeard.py $out/bin/sickbeard + ''; + + meta = with stdenv.lib; { + description = "PVR & episode guide that downloads and manages all your TV shows"; + license = licenses.gpl3; + homepage = https:/github.com/midgetspy/Sick-Beard; + maintainers = with stdenv.lib.maintainers; [ ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b77806ddec6..7be6b9e7c4f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -13525,6 +13525,8 @@ with pkgs; # see also openssl, which has/had this same trick }; + sickbeard = callPackage ../servers/sickbeard { }; + sipcmd = callPackage ../applications/networking/sipcmd { }; sipwitch = callPackage ../servers/sip/sipwitch { }; From 4a2b028921a095b7d431185eb198fefaeef022d3 Mon Sep 17 00:00:00 2001 From: rembo10 Date: Thu, 13 Sep 2018 14:22:17 +0200 Subject: [PATCH 014/371] sickgear: init at 0.17.5 --- pkgs/servers/sickbeard/sickgear.nix | 35 +++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 37 insertions(+) create mode 100644 pkgs/servers/sickbeard/sickgear.nix diff --git a/pkgs/servers/sickbeard/sickgear.nix b/pkgs/servers/sickbeard/sickgear.nix new file mode 100644 index 00000000000..21254f55753 --- /dev/null +++ b/pkgs/servers/sickbeard/sickgear.nix @@ -0,0 +1,35 @@ +{ stdenv, fetchFromGitHub, python2, makeWrapper }: + +let + pythonEnv = python2.withPackages(ps: with ps; [ cheetah ]); +in python2.pkgs.buildPythonApplication rec { + name = "sickgear-${version}"; + version = "0.17.5"; + + src = fetchFromGitHub { + owner = "SickGear"; + repo = "SickGear"; + rev = "release_${version}"; + sha256 = "1lx060klgxz8gjanfjvya6p6kd8842qbpp1qhhiw49a25r8gyxpk"; + }; + + dontBuild = true; + doCheck = false; + + nativeBuildInputs = [ makeWrapper ]; + buildInputs = [ pythonEnv ]; + + installPhase = '' + mkdir -p $out/bin + cp -R {autoProcessTV,gui,lib,sickbeard,SickBeard.py} $out/ + + makeWrapper $out/SickBeard.py $out/bin/sickgear + ''; + + meta = with stdenv.lib; { + description = "The most reliable stable TV fork of the great Sick-Beard to fully automate TV enjoyment with innovation"; + license = licenses.gpl3; + homepage = https:/github.com/SickGear/SickGear; + maintainers = with stdenv.lib.maintainers; [ ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 7be6b9e7c4f..42e64fe2fb4 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -13527,6 +13527,8 @@ with pkgs; sickbeard = callPackage ../servers/sickbeard { }; + sickgear = callPackage ../servers/sickbeard/sickgear.nix { }; + sipcmd = callPackage ../applications/networking/sipcmd { }; sipwitch = callPackage ../servers/sip/sipwitch { }; From 6fb62ac2857e03e5722be90e5fe076939b91261a Mon Sep 17 00:00:00 2001 From: rembo10 Date: Thu, 13 Sep 2018 14:37:12 +0200 Subject: [PATCH 015/371] sickrage: init at v2018.07.21-1 --- pkgs/servers/sickbeard/sickrage.nix | 34 +++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 36 insertions(+) create mode 100644 pkgs/servers/sickbeard/sickrage.nix diff --git a/pkgs/servers/sickbeard/sickrage.nix b/pkgs/servers/sickbeard/sickrage.nix new file mode 100644 index 00000000000..6ee119520b4 --- /dev/null +++ b/pkgs/servers/sickbeard/sickrage.nix @@ -0,0 +1,34 @@ +{ stdenv, fetchFromGitHub, python2, makeWrapper }: + +python2.pkgs.buildPythonApplication rec { + name = "sickrage-${version}"; + version = "v2018.07.21-1"; + + src = fetchFromGitHub { + owner = "SickRage"; + repo = "SickRage"; + rev = "${version}"; + sha256 = "0lzklpsxqrb73inbv8almnhbnb681pmi44gzc8i4sjwmdksiiif9"; + }; + + dontBuild = true; + doCheck = false; + + nativeBuildInputs = [ makeWrapper ]; + buildInputs = [ python2 ]; + + installPhase = '' + mkdir -p $out/bin + cp -R {gui,lib,locale,sickbeard,sickrage,SickBeard.py} $out/ + + makeWrapper $out/SickBeard.py $out/bin/sickrage + ''; + + meta = with stdenv.lib; { + description = "Automatic Video Library Manager for TV Shows"; + longDescription = "It watches for new episodes of your favorite shows, and when they are posted it does its magic."; + license = licenses.gpl3; + homepage = https://sickrage.github.io; + maintainers = [ "sterfield@gmail.com" ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 42e64fe2fb4..5f1304af847 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -13529,6 +13529,8 @@ with pkgs; sickgear = callPackage ../servers/sickbeard/sickgear.nix { }; + sickrage = callPackage ../servers/sickbeard/sickrage.nix { }; + sipcmd = callPackage ../applications/networking/sipcmd { }; sipwitch = callPackage ../servers/sip/sipwitch { }; From a78f6dda0faf42897303b0b9fb8f3449a49a4d01 Mon Sep 17 00:00:00 2001 From: Elias Probst Date: Sun, 16 Sep 2018 19:00:21 +0200 Subject: [PATCH 016/371] arcanist: 20170323 -> 20180916 --- pkgs/development/tools/misc/arcanist/default.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/development/tools/misc/arcanist/default.nix b/pkgs/development/tools/misc/arcanist/default.nix index 15b8f82d0ab..f6ff4ad3650 100644 --- a/pkgs/development/tools/misc/arcanist/default.nix +++ b/pkgs/development/tools/misc/arcanist/default.nix @@ -4,19 +4,19 @@ let libphutil = fetchFromGitHub { owner = "phacility"; repo = "libphutil"; - rev = "01b33af6f4d570b34ad791cd5ccaa3ea7f77dcb9"; - sha256 = "0glrxlj4cr2821pdc2yy2m5bss4yr1zx3sdgw3r5d8hbfz361nx7"; + rev = "3215e4e291ed4468faeed4542d47a571b5bc559a"; + sha256 = "0bbinaxny0j4iniz2grf0s9cysbl3x24yc32f3jra9mwsgh2v2zj"; }; arcanist = fetchFromGitHub { owner = "phacility"; repo = "arcanist"; - rev = "3b6b523c2b236e3724a1e115f126cb6fd05fa128"; - sha256 = "1pr2izwj446rf2v6x6v2wsj7iwnaxq3xg3qqipybyf1xpqfmh5q8"; + rev = "2650e8627a20e1bfe334a4a2b787f44ef5d6ebc5"; + sha256 = "0x0xxiar202ypbgxh19swzjil546bbp8li4k5yrpvab55y8ymkd4"; }; in stdenv.mkDerivation rec { name = "arcanist-${version}"; - version = "20170323"; + version = "20180916"; src = [ arcanist libphutil ]; buildInputs = [ php makeWrapper flex ]; From f1c9d5cf23a40f362338b7aef0af5f5b9829cd0e Mon Sep 17 00:00:00 2001 From: rembo10 Date: Sun, 16 Sep 2018 21:54:16 +0200 Subject: [PATCH 017/371] Add sickbeard module (with SickGear & SickRage) --- nixos/modules/misc/ids.nix | 4 +- nixos/modules/module-list.nix | 1 + nixos/modules/services/misc/sickbeard.nix | 92 +++++++++++++++++++++++ 3 files changed, 95 insertions(+), 2 deletions(-) create mode 100644 nixos/modules/services/misc/sickbeard.nix diff --git a/nixos/modules/misc/ids.nix b/nixos/modules/misc/ids.nix index aafeb997c32..c7bfb7bf474 100644 --- a/nixos/modules/misc/ids.nix +++ b/nixos/modules/misc/ids.nix @@ -289,7 +289,7 @@ stanchion = 262; riak-cs = 263; infinoted = 264; - # keystone = 265; # unused, removed 2017-12-13 + sickbeard = 265; # glance = 266; # unused, removed 2017-12-13 couchpotato = 267; gogs = 268; @@ -579,7 +579,7 @@ stanchion = 262; riak-cs = 263; infinoted = 264; - # keystone = 265; # unused, removed 2017-12-13 + sickbeard = 265; # glance = 266; # unused, removed 2017-12-13 couchpotato = 267; gogs = 268; diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index f51a30aec2e..58bec536c2a 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -393,6 +393,7 @@ ./services/misc/rogue.nix ./services/misc/serviio.nix ./services/misc/safeeyes.nix + ./services/misc/sickbeard.nix ./services/misc/siproxd.nix ./services/misc/snapper.nix ./services/misc/sonarr.nix diff --git a/nixos/modules/services/misc/sickbeard.nix b/nixos/modules/services/misc/sickbeard.nix new file mode 100644 index 00000000000..5cfbbe516ae --- /dev/null +++ b/nixos/modules/services/misc/sickbeard.nix @@ -0,0 +1,92 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + + name = "sickbeard"; + + cfg = config.services.sickbeard; + sickbeard = cfg.package; + +in +{ + + ###### interface + + options = { + services.sickbeard = { + enable = mkOption { + type = types.bool; + default = false; + description = "Whether to enable the sickbeard server."; + }; + package = mkOption { + type = types.package; + default = pkgs.sickbeard; + example = literalExample "pkgs.sickrage"; + description ='' + Enable pkgs.sickrage or pkgs.sickgear + as an alternative to SickBeard + ''; + }; + dataDir = mkOption { + type = types.path; + default = "/var/lib/${name}"; + description = "Path where to store data files."; + }; + configFile = mkOption { + type = types.path; + default = "${cfg.dataDir}/config.ini"; + description = "Path to config file."; + }; + port = mkOption { + type = types.ints.u16; + default = 8081; + description = "Port to bind to."; + }; + user = mkOption { + type = types.str; + default = name; + description = "User to run the service as"; + }; + group = mkOption { + type = types.str; + default = name; + description = "Group to run the service as"; + }; + }; + }; + + + ###### implementation + + config = mkIf cfg.enable { + + users.users = optionalAttrs (cfg.user == name) (singleton { + name = name; + uid = config.ids.uids.sickbeard; + group = cfg.group; + description = "sickbeard user"; + home = cfg.dataDir; + createHome = true; + }); + + users.groups = optionalAttrs (cfg.group == name) (singleton { + name = name; + gid = config.ids.gids.sickbeard; + }); + + systemd.services.sickbeard = { + description = "Sickbeard Server"; + wantedBy = [ "multi-user.target" ]; + after = [ "network.target" ]; + + serviceConfig = { + User = cfg.user; + Group = cfg.group; + ExecStart = "${sickbeard}/SickBeard.py --datadir ${cfg.dataDir} --config ${cfg.configFile} --port ${toString cfg.port}"; + }; + }; + }; +} From 6c4480b498f185c5bf76f5b30ef9a3a755c9885a Mon Sep 17 00:00:00 2001 From: Julien Moutinho Date: Wed, 19 Sep 2018 11:34:08 +0200 Subject: [PATCH 018/371] postfix: add -DUSE_LDAP_SASL in CCARGS to support bind=sasl. --- pkgs/servers/mail/postfix/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/servers/mail/postfix/default.nix b/pkgs/servers/mail/postfix/default.nix index 41dfebab790..d88b9f8b0db 100644 --- a/pkgs/servers/mail/postfix/default.nix +++ b/pkgs/servers/mail/postfix/default.nix @@ -13,7 +13,7 @@ let ] ++ lib.optional withPgSQL "-DHAS_PGSQL" ++ lib.optionals withMySQL [ "-DHAS_MYSQL" "-I${mysql.connector-c}/include/mysql" "-L${mysql.connector-c}/lib/mysql" ] ++ lib.optional withSQLite "-DHAS_SQLITE" - ++ lib.optional withLDAP "-DHAS_LDAP"); + ++ lib.optionals withLDAP ["-DHAS_LDAP" "-DUSE_LDAP_SASL"]); auxlibs = lib.concatStringsSep " " ([ "-ldb" "-lnsl" "-lresolv" "-lsasl2" "-lcrypto" "-lssl" ] ++ lib.optional withPgSQL "-lpq" From 20b09542f2193a18cbf3a8595e472616d5e1757a Mon Sep 17 00:00:00 2001 From: Aaron Andersen Date: Wed, 19 Sep 2018 10:45:05 -0400 Subject: [PATCH 019/371] perlPackages.NetSCP & perlPackages.NetSSH: init at 0.08 & 0.09 --- pkgs/top-level/perl-packages.nix | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix index 714dba45aa2..3b5d867208c 100644 --- a/pkgs/top-level/perl-packages.nix +++ b/pkgs/top-level/perl-packages.nix @@ -11325,6 +11325,21 @@ let }; }; + NetSCP = buildPerlPackage rec { + name = "Net-SCP-0.08.reprise"; + src = fetchurl { + url = "mirror://cpan/authors/id/I/IV/IVAN/${name}.tar.gz"; + sha256 = "88a9b2df69e769e5855a408b19f61915b82e8fe070ab5cf4d525dd3b8bbe31c1"; + }; + propagatedBuildInputs = [ pkgs.openssl Carp Exporter IO NetSSH StringShellQuote ]; + patchPhase = '' + sed -i 's|$scp = "scp";|$scp = "${pkgs.openssh}/bin/scp";|' SCP.pm + ''; + meta = { + description = "Simple wrappers around ssh and scp commands."; + license = with stdenv.lib.licenses; [ artistic1 gpl1Plus ]; + }; + }; NetServer = buildPerlPackage { name = "Net-Server-2.009"; @@ -11403,6 +11418,22 @@ let doCheck = false; # The test suite fails, see https://rt.cpan.org/Public/Bug/Display.html?id=85799 }; + NetSSH = buildPerlPackage rec { + name = "Net-SSH-0.09"; + src = fetchurl { + url = "mirror://cpan/authors/id/I/IV/IVAN/${name}.tar.gz"; + sha256 = "7c71c7c3cbe953234dfe25bcc1ad7edb0e1f5a0578601f5523bc6070262a3817"; + }; + propagatedBuildInputs = [ pkgs.openssl Exporter IO ]; + patchPhase = '' + sed -i 's|$ssh = "ssh";|$ssh = "${pkgs.openssh}/bin/ssh";|' SSH.pm + ''; + meta = { + description = "Simple wrappers around ssh commands."; + license = with stdenv.lib.licenses; [ artistic1 gpl1Plus ]; + }; + }; + NetSSLeay = buildPerlPackage rec { name = "Net-SSLeay-1.85"; src = fetchurl { From 6af4a8e6d72660344485e0300d8ef4b360fcea1b Mon Sep 17 00:00:00 2001 From: Linus Heckemann Date: Wed, 19 Sep 2018 19:30:09 +0200 Subject: [PATCH 020/371] nethack: remove build-time dependency on qt Unless qtMode is enabled :) --- pkgs/games/nethack/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/games/nethack/default.nix b/pkgs/games/nethack/default.nix index 2a39e3499ed..be522b2bacf 100644 --- a/pkgs/games/nethack/default.nix +++ b/pkgs/games/nethack/default.nix @@ -64,12 +64,14 @@ in stdenv.mkDerivation rec { -e 's,^CFLAGS=-g,CFLAGS=,' \ -i sys/unix/hints/macosx10.10 sed -e '/define CHDIR/d' -i include/config.h + ${lib.optionalString qtMode '' sed \ -e 's,^QTDIR *=.*,QTDIR=${qt5.qtbase.dev},' \ -e 's,CFLAGS.*QtGui.*,CFLAGS += `pkg-config Qt5Gui --cflags`,' \ -e 's,CFLAGS+=-DCOMPRESS.*,CFLAGS+=-DCOMPRESS=\\"${gzip}/bin/gzip\\" \\\ -DCOMPRESS_EXTENSION=\\".gz\\",' \ -i sys/unix/hints/linux-qt4 + ''} ''; configurePhase = '' From b8e2d28fa7b97d30e649290f16bdf8665f39c286 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Wed, 19 Sep 2018 22:05:53 -0700 Subject: [PATCH 021/371] yubico-piv-tool: 1.6.1 -> 1.6.2 Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/yubico-piv-tool/versions --- pkgs/tools/misc/yubico-piv-tool/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/misc/yubico-piv-tool/default.nix b/pkgs/tools/misc/yubico-piv-tool/default.nix index d0b7ebf3fc8..ab9eb5d001b 100644 --- a/pkgs/tools/misc/yubico-piv-tool/default.nix +++ b/pkgs/tools/misc/yubico-piv-tool/default.nix @@ -1,11 +1,11 @@ { stdenv, fetchurl, pkgconfig, openssl, pcsclite, check }: stdenv.mkDerivation rec { - name = "yubico-piv-tool-1.6.1"; + name = "yubico-piv-tool-1.6.2"; src = fetchurl { url = "https://developers.yubico.com/yubico-piv-tool/Releases/${name}.tar.gz"; - sha256 = "10xgdc51xvszkxmsvqnbjs8ixxz7rfnfahh3wn8glllynmszbhwi"; + sha256 = "06r3vxgj7qrk8si7khjy696sm45h3w9d0rrrj0hyswalqzavqqga"; }; nativeBuildInputs = [ pkgconfig ]; From 6100592fd5b219780a3d8fe0762570290a955b56 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Wed, 19 Sep 2018 22:37:16 -0700 Subject: [PATCH 022/371] tortoisehg: 4.7 -> 4.7.1 Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/tortoisehg/versions --- pkgs/applications/version-management/tortoisehg/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/version-management/tortoisehg/default.nix b/pkgs/applications/version-management/tortoisehg/default.nix index 71369709b5d..c7a51508a8c 100644 --- a/pkgs/applications/version-management/tortoisehg/default.nix +++ b/pkgs/applications/version-management/tortoisehg/default.nix @@ -2,11 +2,11 @@ python2Packages.buildPythonApplication rec { name = "tortoisehg-${version}"; - version = "4.7"; + version = "4.7.1"; src = fetchurl { url = "https://bitbucket.org/tortoisehg/targz/downloads/${name}.tar.gz"; - sha256 = "1s99dmz8izsyj5mpnqlx9dasw8ar2lr68r3m1wyafzbqlqmbjbqm"; + sha256 = "0x7hz4v882xy2r3k43fbndkq1kqwl3rl1zjmi8pxgpf05qcn950d"; }; pythonPath = with python2Packages; [ pyqt4 mercurial qscintilla iniparse ]; From 3772826f24d6da45e339507eea5d85dc2b4b2827 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Wed, 19 Sep 2018 23:27:18 -0700 Subject: [PATCH 023/371] xercesc: 3.2.1 -> 3.2.2 Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/xerces-c/versions --- pkgs/development/libraries/xercesc/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/xercesc/default.nix b/pkgs/development/libraries/xercesc/default.nix index 9fa1768f4dc..7ed20ed7432 100644 --- a/pkgs/development/libraries/xercesc/default.nix +++ b/pkgs/development/libraries/xercesc/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { name = "xerces-c-${version}"; - version = "3.2.1"; + version = "3.2.2"; src = fetchurl { url = "mirror://apache/xerces/c/3/sources/${name}.tar.gz"; - sha256 = "18045nyjkr2hygkjc43pi2fmz6qcbn9p00kf42my3aa4i0mn1m3d"; + sha256 = "04q4c460wqzyzmprjm22igcm1d52xr20ajxnhr33nv95mbw92qfx"; }; meta = { From 6c6cd16ae89139948a0b12b618a21927bd58fe66 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Wed, 19 Sep 2018 23:31:45 -0700 Subject: [PATCH 024/371] woeusb: 3.2.2 -> 3.2.9 Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/woeusb/versions --- pkgs/tools/misc/woeusb/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/misc/woeusb/default.nix b/pkgs/tools/misc/woeusb/default.nix index e75baac669a..0f0455fe0fe 100644 --- a/pkgs/tools/misc/woeusb/default.nix +++ b/pkgs/tools/misc/woeusb/default.nix @@ -3,14 +3,14 @@ , wxGTK30 }: stdenv.mkDerivation rec { - version = "3.2.2"; + version = "3.2.9"; name = "woeusb-${version}"; src = fetchFromGitHub { owner = "slacka"; repo = "WoeUSB"; rev = "v${version}"; - sha256 = "08spc7r5zgn483y7jmnlqi5417p6h1v6izyx10jnk39md6lv8pb3"; + sha256 = "1h2msp45slcd2s5jgw7ma9r7pl7schrvifw3kp53skxfpyax4j35"; }; buildInputs = [ wxGTK30 autoreconfHook makeWrapper ]; From 39a5ac17e2259774a285ef4119647af791d680a2 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Thu, 20 Sep 2018 04:23:45 -0700 Subject: [PATCH 025/371] sg3_utils: 1.42 -> 1.44 Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/sg3_utils/versions --- pkgs/tools/system/sg3_utils/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/system/sg3_utils/default.nix b/pkgs/tools/system/sg3_utils/default.nix index 8be7203fb3d..67145bc3cc5 100644 --- a/pkgs/tools/system/sg3_utils/default.nix +++ b/pkgs/tools/system/sg3_utils/default.nix @@ -1,11 +1,11 @@ { stdenv, fetchurl }: stdenv.mkDerivation rec { - name = "sg3_utils-1.42"; + name = "sg3_utils-1.44"; src = fetchurl { url = "http://sg.danny.cz/sg/p/${name}.tgz"; - sha256 = "1wwy7iiz1lvc32c777yd4vp0c0dqfdlm5jrsm3aa62xx141pmjqx"; + sha256 = "0yxfbkd48mbzipwmggcvpq60zybsb6anrca878si26z7496nibld"; }; meta = with stdenv.lib; { From f45629107a16badf96c881184dbe83d68bbd9913 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Thu, 20 Sep 2018 06:22:08 -0700 Subject: [PATCH 026/371] psmisc: 23.1 -> 23.2 Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/psmisc/versions --- pkgs/os-specific/linux/psmisc/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/psmisc/default.nix b/pkgs/os-specific/linux/psmisc/default.nix index 1eec10860f7..c7b71d4e501 100644 --- a/pkgs/os-specific/linux/psmisc/default.nix +++ b/pkgs/os-specific/linux/psmisc/default.nix @@ -1,11 +1,11 @@ {stdenv, fetchurl, ncurses}: stdenv.mkDerivation rec { - name = "psmisc-23.1"; + name = "psmisc-23.2"; src = fetchurl { url = "mirror://sourceforge/psmisc/${name}.tar.xz"; - sha256 = "0c5s94hqpwfmyswx2f96gifa6wdbpxxpkyxcrlzbxpvmrxsd911f"; + sha256 = "0s1kjhrik0wzqbm7hv4gkhywhjrwhp9ajw0ad05fwharikk6ah49"; }; buildInputs = [ncurses]; From 86b1f5c71098cf37fbdefafc5cb174e6cae899ea Mon Sep 17 00:00:00 2001 From: Linus Heckemann Date: Thu, 20 Sep 2018 19:32:36 +0200 Subject: [PATCH 027/371] nethack: enable cross-compilation also parallel building --- pkgs/games/nethack/default.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkgs/games/nethack/default.nix b/pkgs/games/nethack/default.nix index be522b2bacf..56342728b40 100644 --- a/pkgs/games/nethack/default.nix +++ b/pkgs/games/nethack/default.nix @@ -1,5 +1,6 @@ { stdenv, lib, fetchurl, coreutils, ncurses, gzip, flex, bison , less, makeWrapper +, buildPackages , x11Mode ? false, qtMode ? false, libXaw, libXext, mkfontdir, pkgconfig, qt5 }: @@ -72,6 +73,12 @@ in stdenv.mkDerivation rec { -DCOMPRESS_EXTENSION=\\".gz\\",' \ -i sys/unix/hints/linux-qt4 ''} + ${lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) '' + ${buildPackages.perl}/bin/perl -p \ + -e 's,[a-z./]+/(makedefs|dgn_comp|lev_comp|dlb)(?!\.),${buildPackages.nethack}/libexec/nethack/\1,g' \ + -i sys/unix/Makefile.* + ''} + sed -i -e '/rm -f $(MAKEDEFS)/d' sys/unix/Makefile.src ''; configurePhase = '' @@ -82,6 +89,8 @@ in stdenv.mkDerivation rec { popd ''; + enableParallelBuilding = true; + postInstall = '' mkdir -p $out/games/lib/nethackuserdir for i in xlogfile logfile perm record save; do @@ -118,6 +127,7 @@ in stdenv.mkDerivation rec { chmod +x $out/bin/nethack ${lib.optionalString x11Mode "mv $out/bin/nethack $out/bin/nethack-x11"} ${lib.optionalString qtMode "mv $out/bin/nethack $out/bin/nethack-qt"} + install -Dm 555 util/{makedefs,dgn_comp,lev_comp,dlb} -t $out/libexec/nethack/ ''; postFixup = lib.optionalString qtMode '' From 8e3ec2b18bea1c3c26732ca9af5340d35b98ade3 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Thu, 20 Sep 2018 10:35:30 -0700 Subject: [PATCH 028/371] lnav: 0.8.3 -> 0.8.4 Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/lnav/versions --- pkgs/tools/misc/lnav/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/misc/lnav/default.nix b/pkgs/tools/misc/lnav/default.nix index 4d7c27a3944..85e4ecd3229 100644 --- a/pkgs/tools/misc/lnav/default.nix +++ b/pkgs/tools/misc/lnav/default.nix @@ -9,7 +9,7 @@ stdenv.mkDerivation rec { owner = "tstack"; repo = "lnav"; rev = "v${meta.version}"; - sha256 = "0hq9ri6a18z682gihxlbh1rndka0v6brkdqsyfsgh4c2fgib4fb7"; + sha256 = "0wzzny0sgrq1ga9qw9nr8ly4j3vy4agszma73902dsw2rwf17j6y"; inherit name; }; @@ -43,7 +43,7 @@ stdenv.mkDerivation rec { ''; downloadPage = "https://github.com/tstack/lnav/releases"; license = licenses.bsd2; - version = "0.8.3"; + version = "0.8.4"; maintainers = [ maintainers.dochang ]; platforms = platforms.unix; }; From c9728a4dcfdcb48be27709cfd64b702525b5bab1 Mon Sep 17 00:00:00 2001 From: Linus Heckemann Date: Thu, 20 Sep 2018 18:47:13 +0100 Subject: [PATCH 029/371] nethack: document cross-compilation fix --- pkgs/games/nethack/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/games/nethack/default.nix b/pkgs/games/nethack/default.nix index 56342728b40..6f60f8d0c1c 100644 --- a/pkgs/games/nethack/default.nix +++ b/pkgs/games/nethack/default.nix @@ -73,7 +73,11 @@ in stdenv.mkDerivation rec { -DCOMPRESS_EXTENSION=\\".gz\\",' \ -i sys/unix/hints/linux-qt4 ''} - ${lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) '' + ${lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) + # If we're cross-compiling, replace the paths to the data generation tools + # with the ones from the build platform's nethack package, since we can't + # run the ones we've built here. + '' ${buildPackages.perl}/bin/perl -p \ -e 's,[a-z./]+/(makedefs|dgn_comp|lev_comp|dlb)(?!\.),${buildPackages.nethack}/libexec/nethack/\1,g' \ -i sys/unix/Makefile.* From ec42304022d1df0e2091c1c63225f12fd25380a2 Mon Sep 17 00:00:00 2001 From: Linus Heckemann Date: Thu, 20 Sep 2018 20:01:36 +0200 Subject: [PATCH 030/371] nethack: add bdftopcf for GUIs --- pkgs/games/nethack/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/games/nethack/default.nix b/pkgs/games/nethack/default.nix index 6f60f8d0c1c..c1911a84c81 100644 --- a/pkgs/games/nethack/default.nix +++ b/pkgs/games/nethack/default.nix @@ -1,7 +1,7 @@ { stdenv, lib, fetchurl, coreutils, ncurses, gzip, flex, bison , less, makeWrapper , buildPackages -, x11Mode ? false, qtMode ? false, libXaw, libXext, mkfontdir, pkgconfig, qt5 +, x11Mode ? false, qtMode ? false, libXaw, libXext, bdftopcf, mkfontdir, pkgconfig, qt5 }: let @@ -34,10 +34,11 @@ in stdenv.mkDerivation rec { ++ lib.optionals qtMode [ gzip qt5.qtbase.bin qt5.qtmultimedia.bin ]; nativeBuildInputs = [ flex bison ] - ++ lib.optionals x11Mode [ mkfontdir ] + ++ lib.optionals x11Mode [ mkfontdir bdftopcf ] ++ lib.optionals qtMode [ pkgconfig mkfontdir qt5.qtbase.dev qt5.qtmultimedia.dev makeWrapper + bdftopcf ]; makeFlags = [ "PREFIX=$(out)" ]; From 6776bc76783cda0d83c345ef4b9423543886d79c Mon Sep 17 00:00:00 2001 From: Linus Heckemann Date: Thu, 20 Sep 2018 20:01:53 +0200 Subject: [PATCH 031/371] nethack: only install dlb for text-mode --- pkgs/games/nethack/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/games/nethack/default.nix b/pkgs/games/nethack/default.nix index c1911a84c81..56904ae2dfe 100644 --- a/pkgs/games/nethack/default.nix +++ b/pkgs/games/nethack/default.nix @@ -132,7 +132,8 @@ in stdenv.mkDerivation rec { chmod +x $out/bin/nethack ${lib.optionalString x11Mode "mv $out/bin/nethack $out/bin/nethack-x11"} ${lib.optionalString qtMode "mv $out/bin/nethack $out/bin/nethack-qt"} - install -Dm 555 util/{makedefs,dgn_comp,lev_comp,dlb} -t $out/libexec/nethack/ + install -Dm 555 util/{makedefs,dgn_comp,lev_comp} -t $out/libexec/nethack/ + ${lib.optionalString (!(x11Mode || qtMode)) "install -Dm 555 util/dlb -t $out/libexec/nethack/"} ''; postFixup = lib.optionalString qtMode '' From 730eb9f5f2b7886efb09f86225a942925baa038c Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Thu, 20 Sep 2018 12:30:18 -0700 Subject: [PATCH 032/371] jmol: 14.29.19 -> 14.29.22 Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/jmol/versions --- pkgs/applications/science/chemistry/jmol/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/science/chemistry/jmol/default.nix b/pkgs/applications/science/chemistry/jmol/default.nix index 80415189d45..b89b28ed047 100644 --- a/pkgs/applications/science/chemistry/jmol/default.nix +++ b/pkgs/applications/science/chemistry/jmol/default.nix @@ -17,7 +17,7 @@ let }; in stdenv.mkDerivation rec { - version = "14.29.19"; + version = "14.29.22"; pname = "jmol"; name = "${pname}-${version}"; @@ -25,7 +25,7 @@ stdenv.mkDerivation rec { baseVersion = "${lib.versions.major version}.${lib.versions.minor version}"; in fetchurl { url = "mirror://sourceforge/jmol/Jmol/Version%20${baseVersion}/Jmol%20${version}/Jmol-${version}-binary.tar.gz"; - sha256 = "0sfbbi6mgj9hqzvcz19cr5s96rna2f2b1nc1d4j28xvva7qaqjm5"; + sha256 = "1wnrrn2wza9z6bp5axg191qf32sx4q8fj4xz404zp278rc4i2fpv"; }; patchPhase = '' From 1e7997bdd2a5dba6a579912cb27ef9461e75e695 Mon Sep 17 00:00:00 2001 From: Victor SENE Date: Mon, 24 Sep 2018 14:32:54 +0200 Subject: [PATCH 033/371] roundcube: init at 1.3.7 --- maintainers/maintainer-list.nix | 5 +++++ pkgs/servers/roundcube/default.nix | 26 ++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 3 files changed, 33 insertions(+) create mode 100644 pkgs/servers/roundcube/default.nix diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 726cbd74313..975aee445e2 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -4421,6 +4421,11 @@ github = "vrthra"; name = "Rahul Gopinath"; }; + vskilet = { + email = "victor@sene.ovh"; + github = "vskilet"; + name = "Victor SENE"; + }; vyp = { email = "elisp.vim@gmail.com"; github = "vyp"; diff --git a/pkgs/servers/roundcube/default.nix b/pkgs/servers/roundcube/default.nix new file mode 100644 index 00000000000..961bdd3c00e --- /dev/null +++ b/pkgs/servers/roundcube/default.nix @@ -0,0 +1,26 @@ +{ lib, stdenv, fetchurl }: + +stdenv.mkDerivation rec { + name= "roundcube-${version}"; + version = "1.3.7"; + + src = fetchurl { + url = "https://github.com/roundcube/roundcubemail/releases/download/${version}/roundcubemail-${version}-complete.tar.gz"; + sha256 = "31bd37d0f89dc634064f170c6ed8981c258754b6f81eccb59a2634b29d0bb01c"; + }; + + installPhase = '' + mkdir -p $out/ + cp -R . $out/ + ln -sf /etc/roundcube/config.inc.php $out/config/config.inc.php + rm -rf $out/installer + ''; + + meta = { + description = "Open Source Webmail Software"; + maintainers = with stdenv.lib.maintainers; [ vskilet ]; + license = stdenv.lib.licenses.gpl3; + platforms = stdenv.lib.platforms.all; + }; +} + diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index da1a81bdb08..1fb0215ac94 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1532,6 +1532,8 @@ with pkgs; riot-web = callPackage ../applications/networking/instant-messengers/riot/riot-web.nix { conf = config.riot-web.conf or null; }; + + roundcube = callPackage ../servers/roundcube { }; rsbep = callPackage ../tools/backup/rsbep { }; From 114a0a8391e317cad8b0f9bd1ca07a97725d895b Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Tue, 25 Sep 2018 06:33:07 -0700 Subject: [PATCH 034/371] apt-cacher-ng: 3.1 -> 3.2 Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/apt-cacher-ng/versions --- pkgs/servers/http/apt-cacher-ng/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/http/apt-cacher-ng/default.nix b/pkgs/servers/http/apt-cacher-ng/default.nix index 415b1fb48a2..aa826a9c528 100644 --- a/pkgs/servers/http/apt-cacher-ng/default.nix +++ b/pkgs/servers/http/apt-cacher-ng/default.nix @@ -14,11 +14,11 @@ stdenv.mkDerivation rec { name = "apt-cacher-ng-${version}"; - version = "3.1"; + version = "3.2"; src = fetchurl { url = "http://ftp.debian.org/debian/pool/main/a/apt-cacher-ng/apt-cacher-ng_${version}.orig.tar.xz"; - sha256 = "0p8cdig70vz1dgw2v8brjin5wqrk8amncphyf11f53bza5grlc91"; + sha256 = "1kas5xq44rx33pczhrz05dsdhjaavxdmcs5h1ygfi76bpqvyhpa0"; }; nativeBuildInputs = [ cmake doxygen pkgconfig ]; From 6390b8b63e623d83558ff97102cd8a21ed99dd75 Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Sat, 22 Sep 2018 22:55:58 +0200 Subject: [PATCH 035/371] fox: mark broken on darwin Undefined symbols for architecture x86_64: "_MPCreateSemaphore", referenced from: FX::FXSemaphore::FXSemaphore(int) in FXThread.o FX::FXSemaphore::FXSemaphore(int) in FXThread.o "_MPDeleteSemaphore", referenced from: FX::FXSemaphore::~FXSemaphore() in FXThread.o FX::FXSemaphore::~FXSemaphore() in FXThread.o "_MPSignalSemaphore", referenced from: FX::FXSemaphore::post() in FXThread.o "_MPWaitOnSemaphore", referenced from: FX::FXSemaphore::wait() in FXThread.o FX::FXSemaphore::trywait() in FXThread.o ld: symbol(s) not found for architecture x86_64 /cc ZHF #45961 --- pkgs/development/libraries/fox/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/libraries/fox/default.nix b/pkgs/development/libraries/fox/default.nix index 8dd78c41b14..40430f34334 100644 --- a/pkgs/development/libraries/fox/default.nix +++ b/pkgs/development/libraries/fox/default.nix @@ -32,6 +32,7 @@ stdenv.mkDerivation rec { homepage = http://fox-toolkit.org; license = licenses.lgpl3; maintainers = []; + broken = stdenv.isDarwin; platforms = platforms.all; }; } From cd78d0cc3ff97924bbc810b025fc0833e2b71916 Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Sat, 22 Sep 2018 23:13:43 +0200 Subject: [PATCH 036/371] flpsed: mark linux only Doesn't build on darwin and probably other platforms. GsWidget.H:26:3: error: 'Atom' does not name a type; did you mean 'tm'? Atom atoms[5]; ^~~~ tm GsWidget.cxx: In member function 'void GsWidget::setProps()': GsWidget.cxx:47:2: error: 'atoms' was not declared in this scope atoms[0] = XInternAtom(fl_display,"GHOSTVIEW" , false); ^~~~~ /cc ZHF #45961 --- pkgs/applications/editors/flpsed/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/editors/flpsed/default.nix b/pkgs/applications/editors/flpsed/default.nix index 67f789eee78..1c40b509bfe 100644 --- a/pkgs/applications/editors/flpsed/default.nix +++ b/pkgs/applications/editors/flpsed/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl, fltk13, ghostscript}: +{ stdenv, fetchurl, fltk13, ghostscript, xlibs }: stdenv.mkDerivation rec { name = "flpsed-${version}"; @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { description = "WYSIWYG PostScript annotator"; homepage = http://flpsed.org/flpsed.html; license = licenses.gpl3; - platforms = platforms.mesaPlatforms; + platforms = platforms.linux; maintainers = with maintainers; [ fuuzetsu ]; }; } From 9b9981928325f1c19b9b65291aa0c29d35ae7e11 Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Tue, 25 Sep 2018 22:33:03 +0200 Subject: [PATCH 037/371] freedroidrpg: don't build on hydra Similar to some other builds, sdl-config gets stuck and times out. checking for sdl-config... /nix/store/q2hm1ka0qxs2gv5bmrxj7j80lygk4b5z-SDL-1.2.15-dev/bin/sdl-config building of '/nix/store/m2d7v0n5hd2498vfxp18i37p7r1lf76p-freedroidrpg-0.16.1' timed out after 7200 seconds of silence /cc ZHF #45961 --- pkgs/games/freedroidrpg/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/games/freedroidrpg/default.nix b/pkgs/games/freedroidrpg/default.nix index 875af8e0664..2ebb60f3d5d 100644 --- a/pkgs/games/freedroidrpg/default.nix +++ b/pkgs/games/freedroidrpg/default.nix @@ -58,5 +58,6 @@ in stdenv.mkDerivation rec { maintainers = with maintainers; [ jtojnar ]; platforms = platforms.unix; + hydraPlatforms = platforms.linux; # sdl-config times out on darwin }; } From bf227129935912caead713fc2706a91767af8ce5 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Cugnet Date: Tue, 25 Sep 2018 22:39:54 +0200 Subject: [PATCH 038/371] erlangR19: 19.3.6.6 -> 19.3.6.11 --- pkgs/development/interpreters/erlang/R19.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/interpreters/erlang/R19.nix b/pkgs/development/interpreters/erlang/R19.nix index d94d4a5a14d..e0d4ecbc95a 100644 --- a/pkgs/development/interpreters/erlang/R19.nix +++ b/pkgs/development/interpreters/erlang/R19.nix @@ -1,8 +1,8 @@ { mkDerivation, fetchpatch }: mkDerivation rec { - version = "19.3.6.6"; - sha256 = "05l81gig0hmr951pjvwknc9x2qvpm95ph9z072hn4jqg13rzbgvg"; + version = "19.3.6.11"; + sha256 = "0b02iv8dly1vkc2xnqqi030sdj34h4gji2h4qgilllajr1f868vm"; patches = [ # macOS 10.13 crypto fix from OTP-20.1.2 From 6e5682ab41030afc2f04591cb431eeb7808e2f79 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Cugnet Date: Tue, 25 Sep 2018 23:21:06 +0200 Subject: [PATCH 039/371] erlangR20: 20.3.8 -> 20.3.8.9 --- pkgs/development/interpreters/erlang/R20.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/interpreters/erlang/R20.nix b/pkgs/development/interpreters/erlang/R20.nix index 19ac6d35592..c408d21d9b3 100644 --- a/pkgs/development/interpreters/erlang/R20.nix +++ b/pkgs/development/interpreters/erlang/R20.nix @@ -1,8 +1,8 @@ { mkDerivation }: mkDerivation rec { - version = "20.3.8"; - sha256 = "1griiszz1x34idmwi6234br7bqd1d7mimim63amjgi9ds79jh6jj"; + version = "20.3.8.9"; + sha256 = "0v2iiyzss8hiih98wvj0gi2qzdmmhh7bvc9p025wlfm4k7r1109a"; prePatch = '' substituteInPlace configure.in --replace '`sw_vers -productVersion`' '10.10' From e387f2506ba402b6c03150485a85b144b03af638 Mon Sep 17 00:00:00 2001 From: Victor SENE Date: Wed, 26 Sep 2018 15:34:46 +0200 Subject: [PATCH 040/371] roundcube: simplify using fetchzip --- pkgs/servers/roundcube/default.nix | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/pkgs/servers/roundcube/default.nix b/pkgs/servers/roundcube/default.nix index 961bdd3c00e..40afd7043e4 100644 --- a/pkgs/servers/roundcube/default.nix +++ b/pkgs/servers/roundcube/default.nix @@ -1,17 +1,14 @@ -{ lib, stdenv, fetchurl }: - -stdenv.mkDerivation rec { - name= "roundcube-${version}"; +{ lib, stdenv, fetchzip }: +let version = "1.3.7"; +in +fetchzip rec { + name= "roundcube-${version}"; - src = fetchurl { - url = "https://github.com/roundcube/roundcubemail/releases/download/${version}/roundcubemail-${version}-complete.tar.gz"; - sha256 = "31bd37d0f89dc634064f170c6ed8981c258754b6f81eccb59a2634b29d0bb01c"; - }; - - installPhase = '' - mkdir -p $out/ - cp -R . $out/ + url = "https://github.com/roundcube/roundcubemail/releases/download/${version}/roundcubemail-${version}-complete.tar.gz"; + sha256 = "0xwqy0adynx7066a0cvz9vyg85waax1i4p70kcdkz7q5jnw4jzhf"; + + extraPostFetch = '' ln -sf /etc/roundcube/config.inc.php $out/config/config.inc.php rm -rf $out/installer ''; From 98cb225d9f13ef8c63623467b7318e43a9203672 Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Wed, 26 Sep 2018 13:42:36 -0500 Subject: [PATCH 041/371] nheko: 0.6.0 -> 0.6.1 --- .../networking/instant-messengers/nheko/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/instant-messengers/nheko/default.nix b/pkgs/applications/networking/instant-messengers/nheko/default.nix index 452ed70e824..810720baa7c 100644 --- a/pkgs/applications/networking/instant-messengers/nheko/default.nix +++ b/pkgs/applications/networking/instant-messengers/nheko/default.nix @@ -20,13 +20,13 @@ let in stdenv.mkDerivation rec { name = "nheko-${version}"; - version = "0.6.0"; + version = "0.6.1"; src = fetchFromGitHub { owner = "mujx"; repo = "nheko"; rev = "v${version}"; - sha256 = "1qd2c5684722jlpgqyxq6pbb1rdk1zc3sk88mkjyqypj1k0pj3dc"; + sha256 = "00jigca7kcqwm57qalz7ifz9p6v7p3pnamjvpkxjjix2rm9wmg2q"; }; # If, on Darwin, you encounter the error From 2bf0ee3b2b47562a31e8d9f9c8fe903f67dbfe5c Mon Sep 17 00:00:00 2001 From: Graham Christensen Date: Tue, 25 Sep 2018 13:54:45 -0400 Subject: [PATCH 042/371] dockertools: tarsum: turn in to a buildInput --- pkgs/build-support/docker/default.nix | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/pkgs/build-support/docker/default.nix b/pkgs/build-support/docker/default.nix index 0cee1dd2916..6b5a06486e7 100644 --- a/pkgs/build-support/docker/default.nix +++ b/pkgs/build-support/docker/default.nix @@ -77,7 +77,9 @@ rec { ln -sT ${docker.src}/components/engine/pkg/tarsum src/github.com/docker/docker/pkg/tarsum go build - cp tarsum $out + mkdir -p $out/bin + + cp tarsum $out/bin/ ''; # buildEnv creates symlinks to dirs, which is hard to edit inside the overlay VM @@ -287,7 +289,7 @@ rec { }: runCommand "docker-layer-${name}" { inherit baseJson contents extraCommands; - buildInputs = [ jshon rsync ]; + buildInputs = [ jshon rsync tarsum ]; } '' mkdir layer @@ -314,11 +316,11 @@ rec { # Compute a checksum of the tarball. echo "Computing layer checksum..." - tarsum=$(${tarsum} < $out/layer.tar) + tarhash=$(tarsum < $out/layer.tar) # Add a 'checksum' field to the JSON, with the value set to the # checksum of the tarball. - cat ${baseJson} | jshon -s "$tarsum" -i checksum > $out/json + cat ${baseJson} | jshon -s "$tarhash" -i checksum > $out/json # Indicate to docker that we're using schema version 1.0. echo -n "1.0" > $out/VERSION @@ -402,8 +404,8 @@ rec { # Compute the tar checksum and add it to the output json. echo "Computing checksum..." - ts=$(${tarsum} < $out/layer.tar) - cat ${baseJson} | jshon -s "$ts" -i checksum > $out/json + tarhash=$(${tarsum}/bin/tarsum < $out/layer.tar) + cat ${baseJson} | jshon -s "$tarhash" -i checksum > $out/json # Indicate to docker that we're using schema version 1.0. echo -n "1.0" > $out/VERSION From fd045173cef84e65a8cb133ded28c99167cb0901 Mon Sep 17 00:00:00 2001 From: Graham Christensen Date: Mon, 24 Sep 2018 16:00:33 -0400 Subject: [PATCH 043/371] referencesByPopularity: init to sort packages by a cachability heuristic Using a simple algorithm, convert the references to a path in to a sorted list of dependent paths based on how often they're referenced and how deep in the tree they live. Equally-"popular" paths are then sorted by name. The existing writeReferencesToFile prints the paths in a simple ascii-based sorting of the paths. Sorting the paths by graph improves the chances that the difference between two builds appear near the end of the list, instead of near the beginning. This makes a difference for Nix builds which export a closure for another program to consume, if that program implements its own level of binary diffing. For an example, Docker Images. If each store path is a separate layer then Docker Images can be very efficiently transfered between systems, and we get very good cache reuse between images built with the same version of Nixpkgs. However, since Docker only reliably supports a small number of layers (42) it is important to pick the individual layers carefully. By storing very popular store paths in the first 40 layers, we improve the chances that the next Docker image will share many of those layers.* Given the dependency tree: A - B - C - D -\ \ \ \ \ \ \ \ \ \ \ - E ---- F \- G Nodes which have multiple references are duplicated: A - B - C - D - F \ \ \ \ \ \- E - F \ \ \ \- E - F \ \- G Each leaf node is now replaced by a counter defaulted to 1: A - B - C - D - (F:1) \ \ \ \ \ \- E - (F:1) \ \ \ \- E - (F:1) \ \- (G:1) Then each leaf counter is merged with its parent node, replacing the parent node with a counter of 1, and each existing counter being incremented by 1. That is to say `- D - (F:1)` becomes `- (D:1, F:2)`: A - B - C - (D:1, F:2) \ \ \ \ \ \- (E:1, F:2) \ \ \ \- (E:1, F:2) \ \- (G:1) Then each leaf counter is merged with its parent node again, merging any counters, then incrementing each: A - B - (C:1, D:2, E:2, F:5) \ \ \ \- (E:1, F:2) \ \- (G:1) And again: A - (B:1, C:2, D:3, E:4, F:8) \ \- (G:1) And again: (A:1, B:2, C:3, D:4, E:5, F:9, G:2) and then paths have the following "popularity": A 1 B 2 C 3 D 4 E 5 F 9 G 2 and the popularity contest would result in the paths being printed as: F E D C B G A * Note: People who have used a Dockerfile before assume Docker's Layers are inherently ordered. However, this is not true -- Docker layers are content-addressable and are not explicitly layered until they are composed in to an Image. --- .../references-by-popularity/closure-graph.py | 520 ++++++++++++++++++ .../references-by-popularity/default.nix | 15 + pkgs/top-level/all-packages.nix | 2 + 3 files changed, 537 insertions(+) create mode 100644 pkgs/build-support/references-by-popularity/closure-graph.py create mode 100644 pkgs/build-support/references-by-popularity/default.nix diff --git a/pkgs/build-support/references-by-popularity/closure-graph.py b/pkgs/build-support/references-by-popularity/closure-graph.py new file mode 100644 index 00000000000..d67a5dfcf14 --- /dev/null +++ b/pkgs/build-support/references-by-popularity/closure-graph.py @@ -0,0 +1,520 @@ +# IMPORTANT: Making changes? +# +# Validate your changes with python3 ./closure-graph.py --test + + +# Using a simple algorithm, convert the references to a path in to a +# sorted list of dependent paths based on how often they're referenced +# and how deep in the tree they live. Equally-"popular" paths are then +# sorted by name. +# +# The existing writeReferencesToFile prints the paths in a simple +# ascii-based sorting of the paths. +# +# Sorting the paths by graph improves the chances that the difference +# between two builds appear near the end of the list, instead of near +# the beginning. This makes a difference for Nix builds which export a +# closure for another program to consume, if that program implements its +# own level of binary diffing. +# +# For an example, Docker Images. If each store path is a separate layer +# then Docker Images can be very efficiently transfered between systems, +# and we get very good cache reuse between images built with the same +# version of Nixpkgs. However, since Docker only reliably supports a +# small number of layers (42) it is important to pick the individual +# layers carefully. By storing very popular store paths in the first 40 +# layers, we improve the chances that the next Docker image will share +# many of those layers.* +# +# Given the dependency tree: +# +# A - B - C - D -\ +# \ \ \ \ +# \ \ \ \ +# \ \ - E ---- F +# \- G +# +# Nodes which have multiple references are duplicated: +# +# A - B - C - D - F +# \ \ \ +# \ \ \- E - F +# \ \ +# \ \- E - F +# \ +# \- G +# +# Each leaf node is now replaced by a counter defaulted to 1: +# +# A - B - C - D - (F:1) +# \ \ \ +# \ \ \- E - (F:1) +# \ \ +# \ \- E - (F:1) +# \ +# \- (G:1) +# +# Then each leaf counter is merged with its parent node, replacing the +# parent node with a counter of 1, and each existing counter being +# incremented by 1. That is to say `- D - (F:1)` becomes `- (D:1, F:2)`: +# +# A - B - C - (D:1, F:2) +# \ \ \ +# \ \ \- (E:1, F:2) +# \ \ +# \ \- (E:1, F:2) +# \ +# \- (G:1) +# +# Then each leaf counter is merged with its parent node again, merging +# any counters, then incrementing each: +# +# A - B - (C:1, D:2, E:2, F:5) +# \ \ +# \ \- (E:1, F:2) +# \ +# \- (G:1) +# +# And again: +# +# A - (B:1, C:2, D:3, E:4, F:8) +# \ +# \- (G:1) +# +# And again: +# +# (A:1, B:2, C:3, D:4, E:5, F:9, G:2) +# +# and then paths have the following "popularity": +# +# A 1 +# B 2 +# C 3 +# D 4 +# E 5 +# F 9 +# G 2 +# +# and the popularity contest would result in the paths being printed as: +# +# F +# E +# D +# C +# B +# G +# A +# +# * Note: People who have used a Dockerfile before assume Docker's +# Layers are inherently ordered. However, this is not true -- Docker +# layers are content-addressable and are not explicitly layered until +# they are composed in to an Image. + +import sys +import json +import unittest + +from pprint import pprint +from collections import defaultdict + +# Find paths in the original dataset which are never referenced by +# any other paths +def find_roots(closures): + roots = []; + + for closure in closures: + path = closure['path'] + if not any_refer_to(path, closures): + roots.append(path) + + return roots + +class TestFindRoots(unittest.TestCase): + def test_find_roots(self): + self.assertCountEqual( + find_roots([ + { + "path": "/nix/store/foo", + "references": [ + "/nix/store/foo", + "/nix/store/bar" + ] + }, + { + "path": "/nix/store/bar", + "references": [ + "/nix/store/bar", + "/nix/store/tux" + ] + }, + { + "path": "/nix/store/hello", + "references": [ + ] + } + ]), + ["/nix/store/foo", "/nix/store/hello"] + ) + + +def any_refer_to(path, closures): + for closure in closures: + if path != closure['path']: + if path in closure['references']: + return True + return False + +class TestAnyReferTo(unittest.TestCase): + def test_has_references(self): + self.assertTrue( + any_refer_to( + "/nix/store/bar", + [ + { + "path": "/nix/store/foo", + "references": [ + "/nix/store/bar" + ] + }, + ] + ), + ) + def test_no_references(self): + self.assertFalse( + any_refer_to( + "/nix/store/foo", + [ + { + "path": "/nix/store/foo", + "references": [ + "/nix/store/foo", + "/nix/store/bar" + ] + }, + ] + ), + ) + +def all_paths(closures): + paths = [] + for closure in closures: + paths.append(closure['path']) + paths.extend(closure['references']) + paths.sort() + return list(set(paths)) + + +class TestAllPaths(unittest.TestCase): + def test_returns_all_paths(self): + self.assertCountEqual( + all_paths([ + { + "path": "/nix/store/foo", + "references": [ + "/nix/store/foo", + "/nix/store/bar" + ] + }, + { + "path": "/nix/store/bar", + "references": [ + "/nix/store/bar", + "/nix/store/tux" + ] + }, + { + "path": "/nix/store/hello", + "references": [ + ] + } + ]), + ["/nix/store/foo", "/nix/store/bar", "/nix/store/hello", "/nix/store/tux",] + ) + def test_no_references(self): + self.assertFalse( + any_refer_to( + "/nix/store/foo", + [ + { + "path": "/nix/store/foo", + "references": [ + "/nix/store/foo", + "/nix/store/bar" + ] + }, + ] + ), + ) + +# Convert: +# +# [ +# { path: /nix/store/foo, references: [ /nix/store/foo, /nix/store/bar, /nix/store/baz ] }, +# { path: /nix/store/bar, references: [ /nix/store/bar, /nix/store/baz ] }, +# { path: /nix/store/baz, references: [ /nix/store/baz, /nix/store/tux ] }, +# { path: /nix/store/tux, references: [ /nix/store/tux ] } +# ] +# +# To: +# { +# /nix/store/foo: [ /nix/store/bar, /nix/store/baz ], +# /nix/store/bar: [ /nix/store/baz ], +# /nix/store/baz: [ /nix/store/tux ] }, +# /nix/store/tux: [ ] +# } +# +# Note that it drops self-references to avoid loops. +def make_lookup(closures): + lookup = {} + + for closure in closures: + # paths often self-refer + nonreferential_paths = [ref for ref in closure['references'] if ref != closure['path']] + lookup[closure['path']] = nonreferential_paths + + return lookup + +class TestMakeLookup(unittest.TestCase): + def test_returns_lookp(self): + self.assertDictEqual( + make_lookup([ + { + "path": "/nix/store/foo", + "references": [ + "/nix/store/foo", + "/nix/store/bar" + ] + }, + { + "path": "/nix/store/bar", + "references": [ + "/nix/store/bar", + "/nix/store/tux" + ] + }, + { + "path": "/nix/store/hello", + "references": [ + ] + } + ]), + { + "/nix/store/foo": [ "/nix/store/bar" ], + "/nix/store/bar": [ "/nix/store/tux" ], + "/nix/store/hello": [ ], + } + ) + +# Convert: +# +# /nix/store/foo with +# { +# /nix/store/foo: [ /nix/store/bar, /nix/store/baz ], +# /nix/store/bar: [ /nix/store/baz ], +# /nix/store/baz: [ /nix/store/tux ] }, +# /nix/store/tux: [ ] +# } +# +# To: +# +# { +# /nix/store/bar: { +# /nix/store/baz: { +# /nix/store/tux: {} +# } +# }, +# /nix/store/baz: { +# /nix/store/tux: {} +# } +# } +def make_graph_segment_from_root(root, lookup): + children = {} + for ref in lookup[root]: + children[ref] = make_graph_segment_from_root(ref, lookup) + return children + +class TestMakeGraphSegmentFromRoot(unittest.TestCase): + def test_returns_graph(self): + self.assertDictEqual( + make_graph_segment_from_root("/nix/store/foo", { + "/nix/store/foo": [ "/nix/store/bar" ], + "/nix/store/bar": [ "/nix/store/tux" ], + "/nix/store/tux": [ ], + "/nix/store/hello": [ ], + }), + { + "/nix/store/bar": { + "/nix/store/tux": {} + } + } + ) + def test_returns_graph_tiny(self): + self.assertDictEqual( + make_graph_segment_from_root("/nix/store/tux", { + "/nix/store/foo": [ "/nix/store/bar" ], + "/nix/store/bar": [ "/nix/store/tux" ], + "/nix/store/tux": [ ], + }), + {} + ) + +# Convert a graph segment in to a popularity-counted dictionary: +# +# From: +# { +# /nix/store/foo: { +# /nix/store/bar: { +# /nix/store/baz: { +# /nix/store/tux: {} +# } +# } +# /nix/store/baz: { +# /nix/store/tux: {} +# } +# } +# } +# +# to: +# [ +# /nix/store/foo: 1 +# /nix/store/bar: 2 +# /nix/store/baz: 4 +# /nix/store/tux: 6 +# ] +def graph_popularity_contest(full_graph): + popularity = defaultdict(int) + for path, subgraph in full_graph.items(): + popularity[path] += 1 + subcontest = graph_popularity_contest(subgraph) + for subpath, subpopularity in subcontest.items(): + popularity[subpath] += subpopularity + 1 + + return popularity + +class TestGraphPopularityContest(unittest.TestCase): + def test_counts_popularity(self): + self.assertDictEqual( + graph_popularity_contest({ + "/nix/store/foo": { + "/nix/store/bar": { + "/nix/store/baz": { + "/nix/store/tux": {} + } + }, + "/nix/store/baz": { + "/nix/store/tux": {} + } + } + }), + { + "/nix/store/foo": 1, + "/nix/store/bar": 2, + "/nix/store/baz": 4, + "/nix/store/tux": 6, + } + ) + +# Emit a list of packages by popularity, most first: +# +# From: +# [ +# /nix/store/foo: 1 +# /nix/store/bar: 1 +# /nix/store/baz: 2 +# /nix/store/tux: 2 +# ] +# +# To: +# [ /nix/store/baz /nix/store/tux /nix/store/bar /nix/store/foo ] +def order_by_popularity(paths): + paths_by_popularity = defaultdict(list) + popularities = [] + for path, popularity in paths.items(): + popularities.append(popularity) + paths_by_popularity[popularity].append(path) + + popularities = list(set(popularities)) + popularities.sort() + + flat_ordered = [] + for popularity in popularities: + paths = paths_by_popularity[popularity] + paths.sort(key=package_name) + + flat_ordered.extend(reversed(paths)) + return list(reversed(flat_ordered)) + + +class TestOrderByPopularity(unittest.TestCase): + def test_returns_in_order(self): + self.assertEqual( + order_by_popularity({ + "/nix/store/foo": 1, + "/nix/store/bar": 1, + "/nix/store/baz": 2, + "/nix/store/tux": 2, + }), + [ + "/nix/store/baz", + "/nix/store/tux", + "/nix/store/bar", + "/nix/store/foo" + ] + ) + +def package_name(path): + parts = path.split('-') + start = parts.pop(0) + # don't throw away any data, so the order is always the same. + # even in cases where only the hash at the start has changed. + parts.append(start) + return '-'.join(parts) + +def main(): + filename = sys.argv[1] + key = sys.argv[2] + + with open(filename) as f: + data = json.load(f) + + # Data comes in as: + # [ + # { path: /nix/store/foo, references: [ /nix/store/foo, /nix/store/bar, /nix/store/baz ] }, + # { path: /nix/store/bar, references: [ /nix/store/bar, /nix/store/baz ] }, + # { path: /nix/store/baz, references: [ /nix/store/baz, /nix/store/tux ] }, + # { path: /nix/store/tux, references: [ /nix/store/tux ] } + # ] + # + # and we want to get out a list of paths ordered by how universally, + # important they are, ie: tux is referenced by every path, transitively + # so it should be #1 + # + # [ + # /nix/store/tux, + # /nix/store/baz, + # /nix/store/bar, + # /nix/store/foo, + # ] + graph = data[key] + + roots = find_roots(graph); + lookup = make_lookup(graph) + + full_graph = {} + for root in roots: + full_graph[root] = make_graph_segment_from_root(root, lookup) + + ordered = order_by_popularity(graph_popularity_contest(full_graph)) + missing = [] + for path in all_paths(graph): + if path not in ordered: + missing.append(path) + + ordered.extend(missing) + print("\n".join(ordered)) + +if "--test" in sys.argv: + # Don't pass --test otherwise unittest gets mad + unittest.main(argv = [f for f in sys.argv if f != "--test" ]) +else: + main() diff --git a/pkgs/build-support/references-by-popularity/default.nix b/pkgs/build-support/references-by-popularity/default.nix new file mode 100644 index 00000000000..4cae2dcf3ca --- /dev/null +++ b/pkgs/build-support/references-by-popularity/default.nix @@ -0,0 +1,15 @@ +{ runCommand, python3, coreutils }: +# Write the references of `path' to a file, in order of how "popular" each +# reference is. Nix 2 only. +path: runCommand "closure-paths" +{ + exportReferencesGraph.graph = path; + __structuredAttrs = true; + PATH = "${coreutils}/bin:${python3}/bin"; + builder = builtins.toFile "builder" + '' + . .attrs.sh + python3 ${./closure-graph.py} .attrs.json graph > ''${outputs[out]} + ''; + } + "" diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 500a713f22b..f90c9c25445 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -366,6 +366,8 @@ with pkgs; nukeReferences = callPackage ../build-support/nuke-references { }; + referencesByPopularity = callPackage ../build-support/references-by-popularity { }; + removeReferencesTo = callPackage ../build-support/remove-references-to { }; vmTools = callPackage ../build-support/vm { }; From 77b5440640c217b170c89ffe862add8d2869badb Mon Sep 17 00:00:00 2001 From: "Wael M. Nasreddine" Date: Tue, 18 Sep 2018 13:25:43 -0700 Subject: [PATCH 044/371] terraform: update all the providers --- .../cluster/terraform/providers/data.nix | 136 +++++++++++------- .../cluster/terraform/providers/update-all | 25 +++- 2 files changed, 104 insertions(+), 57 deletions(-) diff --git a/pkgs/applications/networking/cluster/terraform/providers/data.nix b/pkgs/applications/networking/cluster/terraform/providers/data.nix index 4ae44cafbf4..9267ea9b6df 100644 --- a/pkgs/applications/networking/cluster/terraform/providers/data.nix +++ b/pkgs/applications/networking/cluster/terraform/providers/data.nix @@ -1,11 +1,18 @@ # Generated with ./update-all { + acme = + { + owner = "terraform-providers"; + repo = "terraform-provider-acme"; + version = "1.0.1"; + sha256 = "1yh0dqmrwa1gqpnzj4mdv9p9081azpcskqjrbmy2lzmn3di2ag3r"; + }; alicloud = { owner = "terraform-providers"; repo = "terraform-provider-alicloud"; - version = "1.10.0"; - sha256 = "19lplakpl8dz4a8xw9va86gd774yq4gayq4kzv3pvr62b03a999x"; + version = "1.16.0"; + sha256 = "10v6g25wna63nay0ac3l31qbwdb8bs4vj6d1dr2kqzfqqmw9wnna"; }; archive = { @@ -18,8 +25,8 @@ { owner = "terraform-providers"; repo = "terraform-provider-arukas"; - version = "0.1.0"; - sha256 = "1msfr0rlzjfds02h35p99d1f541a1fzndjcpgijb41yx74h2v5dl"; + version = "1.0.0"; + sha256 = "1v8jzns8czy8navdrabsvc9zk1s9vs1718ngjlx9vs13r3bkm2fc"; }; atlas = { @@ -32,22 +39,22 @@ { owner = "terraform-providers"; repo = "terraform-provider-aws"; - version = "1.30.0"; - sha256 = "1si2fm5nm7gad90lf410zwjf2q5kd8mv6nkkbfnfdzkpkchavr95"; + version = "1.36.0"; + sha256 = "10lcdi609fa4q5xmqxp0vjb4ajqxvkhn61h7bfcc6syhpm20hdj1"; }; azurerm = { owner = "terraform-providers"; repo = "terraform-provider-azurerm"; - version = "1.12.0"; - sha256 = "1avp2vhlj60iw17pw39003p30byms7xvq5lkippm60ak4ky9p51b"; + version = "1.15.0"; + sha256 = "1pdmj0ww5y2nwxivlf5l886nwd76hpqhwdayab2fp16zyl1qbpfd"; }; azurestack = { owner = "terraform-providers"; repo = "terraform-provider-azurestack"; - version = "0.2.0"; - sha256 = "0s1ga0ga0rbpp552hbq1dfnkpdjvk1c40i7qqnqmm20xlz6k55mb"; + version = "0.4.0"; + sha256 = "1c9am0v4aq95k1jblc767vykk76dp0d6z2fvy148ag77cy2jgryc"; }; bitbucket = { @@ -88,8 +95,8 @@ { owner = "terraform-providers"; repo = "terraform-provider-cloudflare"; - version = "1.1.0"; - sha256 = "1rmg7gndhmb1wp0zszhwx9vrax8411iy24yrpkmayjify3vsvdpx"; + version = "1.4.0"; + sha256 = "17ajzm0m73lrp14ikabg26s9gj1dbh23a34231dwv9zqqky93dn7"; }; cloudscale = { @@ -123,8 +130,8 @@ { owner = "terraform-providers"; repo = "terraform-provider-datadog"; - version = "1.1.0"; - sha256 = "0ckmjpw9dkj5490kwxamdvnnidnjdgxnb1biqpvwj4139hlcl628"; + version = "1.2.0"; + sha256 = "1hr3zsisyv04b0skl3v7ghycz3ac2dqkn47qjszmkdg5vvy8dh0g"; }; digitalocean = { @@ -158,8 +165,8 @@ { owner = "terraform-providers"; repo = "terraform-provider-docker"; - version = "1.0.0"; - sha256 = "09ribvyv02r907pdvyrwaklr14xyvyn14rijslnm16xp8d4waz9h"; + version = "1.0.1"; + sha256 = "1q5bsdvp47gvpiyqlzgrpxczlh6m9g870pn84ks49xfkwk5izpz6"; }; dyn = { @@ -193,8 +200,8 @@ { owner = "terraform-providers"; repo = "terraform-provider-github"; - version = "1.1.0"; - sha256 = "1f0yg2qpr9ffimscy17csh20cq9czkcs96ac79s3kl56f8c95ijm"; + version = "1.3.0"; + sha256 = "1k7816dbpsjjbm3pa6l0qlrxw5hh8z5iwdr8mp1mp5liidhl6bqs"; }; gitlab = { @@ -207,8 +214,8 @@ { owner = "terraform-providers"; repo = "terraform-provider-google"; - version = "1.16.2"; - sha256 = "1d8by6rb4s2dggapcbb4b2g5hf280bjayz9p5q9njgsn83579pnm"; + version = "1.18.0"; + sha256 = "0zwy1imby0xqvb86a82rdvglipf2sfpi3rmsj72iikp7vi3mqk64"; }; grafana = { @@ -221,15 +228,15 @@ { owner = "terraform-providers"; repo = "terraform-provider-hcloud"; - version = "1.2.0"; - sha256 = "17zrdzvb9hp02710khvh9pwkavp79zy3y2qzaydgmnrbkks4s8cg"; + version = "1.3.0"; + sha256 = "0sb9pajsy0if18vgw5pllgv8qvb4v7pv65m2f3hfkck2za82ndwb"; }; heroku = { owner = "terraform-providers"; repo = "terraform-provider-heroku"; - version = "1.2.0"; - sha256 = "1w2r0wnfcr9aqij5ckq0apd8az8yzdg704hi1zjb1ggb54v97n31"; + version = "1.4.0"; + sha256 = "159a9add5v4dj2bry1b85i74q2lb4pjjypkm5hzrbqys6gn2imhn"; }; http = { @@ -263,15 +270,15 @@ { owner = "terraform-providers"; repo = "terraform-provider-influxdb"; - version = "1.0.1"; - sha256 = "0713h50675njnpdy4w1azfq8h6yai40gx6w2fbvw4n59h6jlfny4"; + version = "1.0.2"; + sha256 = "05l2i0z35x6462mm1inn6jhp1pfi7df6hv52lhcyypk0lv2rgqf9"; }; kubernetes = { owner = "terraform-providers"; repo = "terraform-provider-kubernetes"; - version = "1.1.0"; - sha256 = "1lhdmglc6nd24ss7z41qqbpsiy71ajvixhq4pfiq0b19hwj6awgn"; + version = "1.2.0"; + sha256 = "0slvhj8f7p27r9v4vb5vjyqpmzlpaji1djzwsxsf247df68mka61"; }; librato = { @@ -315,6 +322,13 @@ version = "1.1.0"; sha256 = "06alk5vd20wzf493dw8hb80q0sx0kw4j8g1sd0193fhni0k4rflw"; }; + netlify = + { + owner = "terraform-providers"; + repo = "terraform-provider-netlify"; + version = "0.1.0"; + sha256 = "1lf66nzqcgzjwvh1lv2jp8gcj6apdanlinci5pri8mgv5r1pv40l"; + }; newrelic = { owner = "terraform-providers"; @@ -350,26 +364,33 @@ version = "1.0.0"; sha256 = "12vpa09xrq8z1pjq0bwzq3889c4fl6c5kvynwqy0z1pdx21m60ha"; }; + oci = + { + owner = "terraform-providers"; + repo = "terraform-provider-oci"; + version = "3.0.0"; + sha256 = "08p13yzc3h8xng77ia3x4lmar8k6860gkx6w16ccw311ndzl586h"; + }; oneandone = { owner = "terraform-providers"; repo = "terraform-provider-oneandone"; - version = "1.2.0"; - sha256 = "1lrcy05zklv7vc8653f8cn3jjc9zjjwi488dpaphsmsl1md3m88b"; + version = "1.3.0"; + sha256 = "0c412nqg3k17124i51nn3ffra6gcll904h37h7hyvz97cdblcncn"; }; opc = { owner = "terraform-providers"; repo = "terraform-provider-opc"; - version = "1.2.0"; - sha256 = "19rfm12w97ccyrzpdw0qlwfn7gh64lqh17kj3cv11y1f731z8rlw"; + version = "1.2.1"; + sha256 = "0mnvi47kbdwwpfzdlcd1mhd15w5b0ivwxi1a5lvs0zyqf0g0cas8"; }; openstack = { owner = "terraform-providers"; repo = "terraform-provider-openstack"; - version = "1.7.0"; - sha256 = "0sw2kmcsi9sjzi549fj6knida01q0lnpqvc3cpyjyv92f6w4bznn"; + version = "1.9.0"; + sha256 = "0prmdj78jsyrns876cglfp8a3dbpfl33bwb0dj072flh4yknfrdr"; }; opentelekomcloud = { @@ -389,8 +410,8 @@ { owner = "terraform-providers"; repo = "terraform-provider-oraclepaas"; - version = "1.3.0"; - sha256 = "09vsb52cbf2h1rdwfg4xb54gklwgmaxdgjcdq1yx5gxj7lfbdl9v"; + version = "1.3.1"; + sha256 = "1vyqkxq3c98gfpshr1zz4y91jfblnyzrbzwr40dsc6r9b6jlbwqa"; }; ovh = { @@ -410,15 +431,15 @@ { owner = "terraform-providers"; repo = "terraform-provider-pagerduty"; - version = "1.1.1"; - sha256 = "1dpl6cnii9kzx9lr1f9vndh7w6mfg5kv6az7dq49lhi16sxwwb6a"; + version = "1.2.0"; + sha256 = "037mdcvpcpjj0dpwg0nny862j631ajhv472a847p2ajgk02bq1wf"; }; panos = { owner = "terraform-providers"; repo = "terraform-provider-panos"; - version = "1.3.0"; - sha256 = "1isnhaszld96zpkcbwkf70nhhwmsl2z3s9868cjsac44b27gsvrq"; + version = "1.4.0"; + sha256 = "033xpglbn0q805b129kf1ywl13m4pgrkwlvgl347nldysryiasxq"; }; postgresql = { @@ -438,8 +459,8 @@ { owner = "terraform-providers"; repo = "terraform-provider-profitbricks"; - version = "1.3.2"; - sha256 = "0mk77n833np6ahm6bzvpg31a0m1qazaipd0vqzccqfkbz78sm3jb"; + version = "1.4.0"; + sha256 = "1yrmlpqc1bzgs3c8pxhfbscf4anjri6gv6sd8i8rn764z8xhwaff"; }; rabbitmq = { @@ -459,8 +480,8 @@ { owner = "terraform-providers"; repo = "terraform-provider-random"; - version = "1.3.1"; - sha256 = "0zcvw0vz7mxx46m2jamhmkl7l0k8v0q5fha5z6cra3y2ikhqrnfl"; + version = "2.0.0"; + sha256 = "0plg139pbvqwbs5hcl7d5kjn7vwknjr4n0ysc2j5s25iyhikkv9s"; }; rundeck = { @@ -480,8 +501,8 @@ { owner = "terraform-providers"; repo = "terraform-provider-scaleway"; - version = "1.5.1"; - sha256 = "1b42fh7mwj2cx3g16lgp4sw6ca5qqj0mhm6i7qid8agwsga34v0y"; + version = "1.6.0"; + sha256 = "1ykcakfw0gp239jp4brpjynxzzvlhldfpv12hkgymj22s37n5jnn"; }; softlayer = { @@ -494,8 +515,8 @@ { owner = "terraform-providers"; repo = "terraform-provider-spotinst"; - version = "1.2.0"; - sha256 = "09k79xg5cbs4qhxr0b4f42qpxj6j2795z5vmwbxfkirb5bkpqdq1"; + version = "1.4.0"; + sha256 = "0kb09v18ksh2r4b5k9iv4rzq403zk1shpakk54pmq8s6i5jd085g"; }; statuscake = { @@ -525,12 +546,19 @@ version = "1.0.2"; sha256 = "1aj6g6l68n9kqmxfjlkwwxnac7fhha6wrmvsw4yylf0qyssww75v"; }; + tfe = + { + owner = "terraform-providers"; + repo = "terraform-provider-tfe"; + version = "0.1.0"; + sha256 = "1mzrp2yk2w8clqkydkz761vj5spgb2n79yi3ng85rkqvchzamsh5"; + }; tls = { owner = "terraform-providers"; repo = "terraform-provider-tls"; - version = "1.1.0"; - sha256 = "1kzq6al9rzpmk98bmxcf5gjx5s28gfjp1xvdsnd4a113pljn0ddb"; + version = "1.2.0"; + sha256 = "0hvj00j8a820j18yi90xzhd635pkffivp1116d84wyqxya5acd4p"; }; triton = { @@ -550,8 +578,8 @@ { owner = "terraform-providers"; repo = "terraform-provider-vault"; - version = "1.1.1"; - sha256 = "0kiqpnb4669xw9b8nf6a8ky0jhnp14bipaizml3gdh1hnda6hflw"; + version = "1.1.3"; + sha256 = "1aq82w4g3hdvb3ba86fisjc2lqbzsymn2q2kni8cyqvwhcxk1r4c"; }; vcd = { @@ -564,7 +592,7 @@ { owner = "terraform-providers"; repo = "terraform-provider-vsphere"; - version = "1.6.0"; - sha256 = "1xav341bal7lyb206zw2nzgzjvwkda54cgksza44q3jhqznxma47"; + version = "1.8.1"; + sha256 = "0y6n7mvv1f3jqsxlvf68iq85k69fj7a333203vkvc83dba84aqki"; }; } diff --git a/pkgs/applications/networking/cluster/terraform/providers/update-all b/pkgs/applications/networking/cluster/terraform/providers/update-all index 31a5a4a750d..83cc989cf9a 100755 --- a/pkgs/applications/networking/cluster/terraform/providers/update-all +++ b/pkgs/applications/networking/cluster/terraform/providers/update-all @@ -7,10 +7,21 @@ # all the providers. set -euo pipefail +# the maximum number of attempts before giving up inside of GET and prefetch_github +readonly maxAttempts=30 + GET() { local url=$1 + local retry=1 echo "fetching $url" >&2 - curl -#fL -u "$GITHUB_AUTH" "$url" + while ! curl -#fL -u "$GITHUB_AUTH" "$url"; do + echo "The curl command has failed. Attempt $retry/${maxAttempts}" >&2 + if [[ "${retry}" -eq "${maxAttempts}" ]]; then + exit 1 + fi + retry=$(( retry + 1 )) + sleep 5 + done } get_org_repos() { @@ -24,6 +35,7 @@ get_repo_tags() { local repo=$2 GET "https://api.github.com/repos/$owner/$repo/git/refs/tags?per_page=100" | \ jq -r '.[].ref' | \ + grep -v 'v\.' | \ cut -d '/' -f 3- | \ sort --version-sort } @@ -32,7 +44,15 @@ prefetch_github() { local owner=$1 local repo=$2 local rev=$3 - nix-prefetch-url --unpack "https://github.com/$owner/$repo/archive/$rev.tar.gz" + local retry=1 + while ! nix-prefetch-url --unpack "https://github.com/$owner/$repo/archive/$rev.tar.gz"; do + echo "The nix-prefetch-url command has failed. Attempt $retry/${maxAttempts}" >&2 + if [[ "${retry}" -eq "${maxAttempts}" ]]; then + exit 1 + fi + retry=$(( retry + 1 )) + sleep 5 + done } echo_entry() { @@ -73,7 +93,6 @@ org=terraform-providers repos=$(get_org_repos "$org" | grep terraform-provider- | grep -v terraform-provider-scaffolding | grep -v terraform-provider-azure-classic | sort) - # Get all the providers with index cat <
data.nix From f95c18f3d151eca3876abf8b30dc808658b2c9a8 Mon Sep 17 00:00:00 2001 From: "Wael M. Nasreddine" Date: Tue, 18 Sep 2018 13:27:04 -0700 Subject: [PATCH 045/371] terraform-provider-nixos: move the provider to the inside of terraform.withPlugins --- .../terraform-provider-nixos/default.nix | 23 ------------ .../cluster/terraform/providers/data.nix | 7 ++++ .../cluster/terraform/providers/update-all | 37 +++++++++++-------- pkgs/top-level/all-packages.nix | 2 - 4 files changed, 29 insertions(+), 40 deletions(-) delete mode 100644 pkgs/applications/networking/cluster/terraform-provider-nixos/default.nix diff --git a/pkgs/applications/networking/cluster/terraform-provider-nixos/default.nix b/pkgs/applications/networking/cluster/terraform-provider-nixos/default.nix deleted file mode 100644 index f4ad171c267..00000000000 --- a/pkgs/applications/networking/cluster/terraform-provider-nixos/default.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ stdenv, buildGoPackage, fetchFromGitHub }: -buildGoPackage rec { - name = "terraform-provider-nixos-${version}"; - version = "0.0.1"; - goPackagePath = "github.com/tweag/terraform-provider-nixos"; - src = fetchFromGitHub { - owner = "tweag"; - repo = "terraform-provider-nixos"; - sha256 = "00vz6qjq1pk39iqg4356b8g3c6slla9jifkv2knk46gc9q93q0lf"; - rev = "v${version}"; - }; - - # Terraform allow checking the provider versions, but this breaks - # if the versions are not provided via file paths. - postBuild = "mv go/bin/terraform-provider-nixos{,_v${version}}"; - - meta = with stdenv.lib; { - description = "Terraform plugin for outputting NixOS configuration files from Terraform resources."; - homepage = "https://github.com/tweag/terraform-provider-nixos"; - license = licenses.mpl20; - maintainers = with maintainers; [ grahamc ]; - }; -} diff --git a/pkgs/applications/networking/cluster/terraform/providers/data.nix b/pkgs/applications/networking/cluster/terraform/providers/data.nix index 9267ea9b6df..508f0658354 100644 --- a/pkgs/applications/networking/cluster/terraform/providers/data.nix +++ b/pkgs/applications/networking/cluster/terraform/providers/data.nix @@ -595,4 +595,11 @@ version = "1.8.1"; sha256 = "0y6n7mvv1f3jqsxlvf68iq85k69fj7a333203vkvc83dba84aqki"; }; + nixos = + { + owner = "tweag"; + repo = "terraform-provider-nixos"; + version = "0.0.1"; + sha256 = "00vz6qjq1pk39iqg4356b8g3c6slla9jifkv2knk46gc9q93q0lf"; + }; } diff --git a/pkgs/applications/networking/cluster/terraform/providers/update-all b/pkgs/applications/networking/cluster/terraform/providers/update-all index 83cc989cf9a..ac005c5f59e 100755 --- a/pkgs/applications/networking/cluster/terraform/providers/update-all +++ b/pkgs/applications/networking/cluster/terraform/providers/update-all @@ -72,6 +72,21 @@ EOF indent() { sed 's/^/ /'; } +add_repo() { + org="${1}" + repo="${2}" + + echo "*** $repo ***" + name=$(echo "$repo" | cut -d - -f 3-) + last_tag=$(get_repo_tags "$org" "$repo" | tail -1) + last_tag_sha256=$(prefetch_github "$org" "$repo" "$last_tag") + + { + echo " $name =" + echo_entry "$org" "$repo" "$last_tag" "$last_tag_sha256" | indent + } >> data.nix +} + ## Main ## cd "$(dirname "$0")" @@ -89,29 +104,21 @@ HELP exit 1 fi -org=terraform-providers - -repos=$(get_org_repos "$org" | grep terraform-provider- | grep -v terraform-provider-scaffolding | grep -v terraform-provider-azure-classic | sort) - -# Get all the providers with index - cat <
data.nix # Generated with ./update-all { HEADER +# add all the repos under the terraform-providers organisation +org=terraform-providers +repos=$(get_org_repos "$org" | grep terraform-provider- | grep -v terraform-provider-scaffolding | grep -v terraform-provider-azure-classic | sort) for repo in $repos; do - echo "*** $repo ***" - name=$(echo "$repo" | cut -d - -f 3-) - last_tag=$(get_repo_tags "$org" "$repo" | tail -1) - last_tag_sha256=$(prefetch_github "$org" "$repo" "$last_tag") - - { - echo " $name =" - echo_entry "$org" "$repo" "$last_tag" "$last_tag_sha256" | indent - } >> data.nix + add_repo "$org" "$repo" done +# add the repos that live outside of terraform-providers +add_repo tweag terraform-provider-nixos + cat <