extra-container: pin to nixpkgs-unstable

extra-container is now part of nixpkgs.
This commit is contained in:
Erik Arvstedt 2021-10-05 16:52:03 +02:00
parent 75b89f3957
commit 265fc1911d
No known key found for this signature in database
GPG Key ID: 33312B944DD97846
5 changed files with 6 additions and 42 deletions

View File

@ -6,7 +6,7 @@ let
nbPkgs = import ../pkgs { inherit pkgs; }; nbPkgs = import ../pkgs { inherit pkgs; };
cfgDir = toString configDir; cfgDir = toString configDir;
path = lib.optionalString pkgs.stdenv.isLinux '' 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 in
pkgs.stdenv.mkDerivation { pkgs.stdenv.mkDerivation {

View File

@ -13,7 +13,6 @@ let self = {
nixops19_09 = pkgs.callPackage ./nixops { }; nixops19_09 = pkgs.callPackage ./nixops { };
krops = import ./krops { }; krops = import ./krops { };
netns-exec = pkgs.callPackage ./netns-exec { }; netns-exec = pkgs.callPackage ./netns-exec { };
extra-container = pkgs.callPackage ./extra-container { };
clightning-plugins = pkgs.recurseIntoAttrs (import ./clightning-plugins pkgs self.nbPython3Packages); clightning-plugins = pkgs.recurseIntoAttrs (import ./clightning-plugins pkgs self.nbPython3Packages);
clboss = pkgs.callPackage ./clboss { }; clboss = pkgs.callPackage ./clboss { };
secp256k1 = pkgs.callPackage ./secp256k1 { }; secp256k1 = pkgs.callPackage ./secp256k1 { };

View File

@ -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 ];
};
}

View File

@ -12,6 +12,7 @@ pkgs: pkgsUnstable:
clightning clightning
electrs electrs
elementsd elementsd
extra-container
hwi hwi
lightning-loop lightning-loop
lightning-pool lightning-pool

View File

@ -77,9 +77,10 @@ while [[ $# > 0 ]]; do
done done
containerBin=$(type -P extra-container) || true containerBin=$(type -P extra-container) || true
if [[ ! ($containerBin && $(realpath $containerBin) == *extra-container-0.7*) ]]; then if [[ ! ($containerBin && $(realpath $containerBin) == *extra-container-0.8*) ]]; then
echo "Building extra-container. Skip this step by adding extra-container 0.7 to PATH." 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 extra-container >/dev/null nix-build --out-link /tmp/extra-container "$scriptDir"/../pkgs \
-A pinned.extra-container >/dev/null
export PATH="/tmp/extra-container/bin${PATH:+:}$PATH" export PATH="/tmp/extra-container/bin${PATH:+:}$PATH"
fi fi