pkgs: add extra-container
This commit is contained in:
parent
be2127ae5b
commit
ac6cee5c12
@ -11,11 +11,6 @@ let
|
|||||||
nixpkgs = import nixpkgs-path {};
|
nixpkgs = import nixpkgs-path {};
|
||||||
nix-bitcoin = nixpkgs.callPackage nix-bitcoin-path {};
|
nix-bitcoin = nixpkgs.callPackage nix-bitcoin-path {};
|
||||||
|
|
||||||
extraContainer = nixpkgs.callPackage (builtins.fetchTarball {
|
|
||||||
url = "https://github.com/erikarvstedt/extra-container/archive/6cced2c26212cc1c8cc7cac3547660642eb87e71.tar.gz";
|
|
||||||
sha256 = "0qr41mma2iwxckdhqfabw3vjcbp2ffvshnc3k11kwriwj14b766v";
|
|
||||||
}) {};
|
|
||||||
|
|
||||||
nix-bitcoin-unpacked = (import <nixpkgs> {}).runCommand "nix-bitcoin-src" {} ''
|
nix-bitcoin-unpacked = (import <nixpkgs> {}).runCommand "nix-bitcoin-src" {} ''
|
||||||
mkdir $out; tar xf ${builtins.fetchurl nix-bitcoin-release} -C $out
|
mkdir $out; tar xf ${builtins.fetchurl nix-bitcoin-release} -C $out
|
||||||
'';
|
'';
|
||||||
@ -25,7 +20,7 @@ with nixpkgs;
|
|||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "nix-bitcoin-environment";
|
name = "nix-bitcoin-environment";
|
||||||
|
|
||||||
buildInputs = [ nix-bitcoin.nixops19_09 figlet extraContainer ];
|
buildInputs = [ nix-bitcoin.nixops19_09 nix-bitcoin.extra-container figlet ];
|
||||||
|
|
||||||
shellHook = ''
|
shellHook = ''
|
||||||
export NIX_PATH="nixpkgs=${nixpkgs-path}:nix-bitcoin=${toString nix-bitcoin-path}:."
|
export NIX_PATH="nixpkgs=${nixpkgs-path}:nix-bitcoin=${toString nix-bitcoin-path}:."
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
nixops19_09 = pkgs.callPackage ./nixops { };
|
nixops19_09 = pkgs.callPackage ./nixops { };
|
||||||
netns-exec = pkgs.callPackage ./netns-exec { };
|
netns-exec = pkgs.callPackage ./netns-exec { };
|
||||||
lightning-loop = pkgs.callPackage ./lightning-loop { };
|
lightning-loop = pkgs.callPackage ./lightning-loop { };
|
||||||
|
extra-container = pkgs.callPackage ./extra-container { };
|
||||||
|
|
||||||
pinned = import ./pinned.nix;
|
pinned = import ./pinned.nix;
|
||||||
|
|
||||||
|
25
pkgs/extra-container/default.nix
Normal file
25
pkgs/extra-container/default.nix
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
{ stdenv, lib }:
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
name = "extra-container-${version}";
|
||||||
|
version = "0.3";
|
||||||
|
|
||||||
|
src = builtins.fetchTarball {
|
||||||
|
url = "https://github.com/erikarvstedt/extra-container/archive/6cced2c26212cc1c8cc7cac3547660642eb87e71.tar.gz";
|
||||||
|
sha256 = "0qr41mma2iwxckdhqfabw3vjcbp2ffvshnc3k11kwriwj14b766v";
|
||||||
|
};
|
||||||
|
|
||||||
|
buildCommand = ''
|
||||||
|
install -D $src/extra-container $out/bin/extra-container
|
||||||
|
patchShebangs $out/bin
|
||||||
|
install $src/eval-config.nix -Dt $out/src
|
||||||
|
sed -i "s|evalConfig=.*|evalConfig=$out/src/eval-config.nix|" $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 ];
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user