From 265fc1911d9eb9cf124e1e99ad4de20445cbd544 Mon Sep 17 00:00:00 2001 From: Erik Arvstedt Date: Tue, 5 Oct 2021 16:52:03 +0200 Subject: [PATCH] extra-container: pin to nixpkgs-unstable extra-container is now part of nixpkgs. --- helper/makeShell.nix | 2 +- pkgs/default.nix | 1 - pkgs/extra-container/default.nix | 37 -------------------------------- pkgs/pinned.nix | 1 + test/lib/make-container.sh | 7 +++--- 5 files changed, 6 insertions(+), 42 deletions(-) delete mode 100644 pkgs/extra-container/default.nix diff --git a/helper/makeShell.nix b/helper/makeShell.nix index d11008d..19386be 100644 --- a/helper/makeShell.nix +++ b/helper/makeShell.nix @@ -6,7 +6,7 @@ let nbPkgs = import ../pkgs { inherit pkgs; }; cfgDir = toString configDir; path = lib.optionalString pkgs.stdenv.isLinux '' - export PATH="${lib.makeBinPath [ nbPkgs.extra-container ]}''${PATH:+:}$PATH" + export PATH="${lib.makeBinPath [ nbPkgs.pinned.extra-container ]}''${PATH:+:}$PATH" ''; in pkgs.stdenv.mkDerivation { diff --git a/pkgs/default.nix b/pkgs/default.nix index 39df452..2ab1e1f 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -13,7 +13,6 @@ let self = { nixops19_09 = pkgs.callPackage ./nixops { }; krops = import ./krops { }; netns-exec = pkgs.callPackage ./netns-exec { }; - extra-container = pkgs.callPackage ./extra-container { }; clightning-plugins = pkgs.recurseIntoAttrs (import ./clightning-plugins pkgs self.nbPython3Packages); clboss = pkgs.callPackage ./clboss { }; secp256k1 = pkgs.callPackage ./secp256k1 { }; diff --git a/pkgs/extra-container/default.nix b/pkgs/extra-container/default.nix deleted file mode 100644 index 40f8308..0000000 --- a/pkgs/extra-container/default.nix +++ /dev/null @@ -1,37 +0,0 @@ -{ stdenv, lib, nixos-container, openssh -, glibcLocales -}: - -stdenv.mkDerivation rec { - pname = "extra-container"; - # Update this file when changing the version: ../../test/lib/make-container.sh - version = "0.7"; - - src = builtins.fetchTarball { - url = "https://github.com/erikarvstedt/extra-container/archive/${version}.tar.gz"; - sha256 = "1hcbi611vm0kn8rl7q974wcjkihpddan6m3p7hx8l8jnv18ydng8"; - }; - - buildCommand = '' - install -D $src/extra-container $out/bin/extra-container - patchShebangs $out/bin - share=$out/share/extra-container - install $src/eval-config.nix -Dt $share - - # Use existing PATH for systemctl and machinectl - scriptPath="export PATH=${lib.makeBinPath [ nixos-container openssh ]}:\$PATH" - - sed -i \ - -e "s|evalConfig=.*|evalConfig=$share/eval-config.nix|" \ - -e "s|LOCALE_ARCHIVE=.*|LOCALE_ARCHIVE=${glibcLocales}/lib/locale/locale-archive|" \ - -e "2i$scriptPath" \ - $out/bin/extra-container - ''; - - meta = with lib; { - description = "Run declarative containers without full system rebuilds"; - homepage = https://github.com/erikarvstedt/extra-container; - license = licenses.mit; - maintainers = [ maintainers.earvstedt ]; - }; -} diff --git a/pkgs/pinned.nix b/pkgs/pinned.nix index 10c6042..90954f8 100644 --- a/pkgs/pinned.nix +++ b/pkgs/pinned.nix @@ -12,6 +12,7 @@ pkgs: pkgsUnstable: clightning electrs elementsd + extra-container hwi lightning-loop lightning-pool diff --git a/test/lib/make-container.sh b/test/lib/make-container.sh index 70803fb..845cbc4 100755 --- a/test/lib/make-container.sh +++ b/test/lib/make-container.sh @@ -77,9 +77,10 @@ while [[ $# > 0 ]]; do done containerBin=$(type -P extra-container) || true -if [[ ! ($containerBin && $(realpath $containerBin) == *extra-container-0.7*) ]]; then - echo "Building extra-container. Skip this step by adding extra-container 0.7 to PATH." - nix-build --out-link /tmp/extra-container "$scriptDir"/../pkgs -A extra-container >/dev/null +if [[ ! ($containerBin && $(realpath $containerBin) == *extra-container-0.8*) ]]; then + echo "Building extra-container. Skip this step by adding extra-container 0.8 to PATH." + nix-build --out-link /tmp/extra-container "$scriptDir"/../pkgs \ + -A pinned.extra-container >/dev/null export PATH="/tmp/extra-container/bin${PATH:+:}$PATH" fi