Skip to content

Commit

Permalink
Add getopt as a dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
FaustXVI committed Nov 19, 2019
1 parent dd6167c commit 3d364a6
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 19 deletions.
24 changes: 17 additions & 7 deletions default.nix
Original file line number Diff line number Diff line change
@@ -1,18 +1,28 @@
{ pkgs ? (import <nixpkgs> {}), stdenv ? pkgs.stdenv }:
{ nixpkgs ? (import <nixpkgs> {}), stdenv ? nixpkgs.stdenv }:

with pkgs;
with nixpkgs;

stdenv.mkDerivation rec {
name = "tcrdd";
version = "latest";
buildInputs = [ bash git ];
buildInputs = [ bash git getopt ];

src = ./.;
phases = "installPhase fixupPhase";
installPhase = ''
mkdir tmp
patchPhase = ''
cp -r $src patched
chmod +w -R patched
patchShebangs patched/*.sh
substituteInPlace patched/tcrdd.sh --replace 'getopt' ${getopt}/bin/getopt
'';
buildPhase =''
cd patched
mkdir -p tmp
export SHUNIT_TMPDIR=./tmp
./tcrdd_test.sh
cd -
'';
installPhase = ''
mkdir -p $out/bin
cp $src/tcrdd.sh $out/bin/tcrdd
cp patched/tcrdd.sh $out/bin/tcrdd
'';
}
12 changes: 0 additions & 12 deletions shell.nix

This file was deleted.

0 comments on commit 3d364a6

Please sign in to comment.