added wrapper
This commit is contained in:
parent
4148be6ec7
commit
4b6e8d0b87
7 changed files with 37 additions and 6 deletions
14
nix/wrapper/default.nix
Normal file
14
nix/wrapper/default.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{ pkgs, ... }: pkgs.stdenv.mkDerivation {
|
||||
name = "aoc2021";
|
||||
buildInputs = [ pkgs.haskellPackages.aoc2021-programs ];
|
||||
src = ../../.;
|
||||
installPhase = ''
|
||||
mkdir -p $out/{bin,files}
|
||||
cat > $out/bin/aoc2021 << EOF
|
||||
#!/bin/bash
|
||||
cat $out/files/\''${1}-input.txt | ${pkgs.haskellPackages.aoc2021-programs}/bin/aoc2021-\''${1}
|
||||
EOF
|
||||
chmod +x $out/bin/aoc2021
|
||||
find code/ -type f | grep -i input.txt$ | xargs -i cp {} $out/files
|
||||
'';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue