home

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

default.nix (711B)


      1 { stdenv, lib, fetchFromGitHub }:
      2 
      3 stdenv.mkDerivation rec {
      4   pname = "toolbox";
      5   version = "0.0.92";
      6   name = "${pname}-${version}";
      7 
      8   src = fetchFromGitHub {
      9     owner = "containers";
     10     repo = "toolbox";
     11     rev = "${version}";
     12     sha256 = "0lqrhqpi012m9qadh9lgqmqshfwfkmfd0h5nfg7692rza0gkiy85";
     13   };
     14 
     15   phases = "unpackPhase installPhase";
     16 
     17   installPhase = ''
     18     mkdir $out
     19     install -D toolbox $out/bin/toolbox
     20     install -D profile.d/toolbox.sh $out/share/toolbox/profile.d/toolbox.sh
     21     sed -i 's%/etc/profile.d/%$out/share/toolbox/profile.d/%g' toolbox
     22     mkdir -p $out/share/bash-completion/completions/
     23     cp completion/bash/toolbox $out/share/bash-completion/completions/toolbox
     24   '';
     25 }