Skip to content

Instantly share code, notes, and snippets.

@srhb
Created April 8, 2019 18:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save srhb/b3e9d35576fb441d2d2edaf19875a018 to your computer and use it in GitHub Desktop.
Save srhb/b3e9d35576fb441d2d2edaf19875a018 to your computer and use it in GitHub Desktop.
{ pkgs ? import <nixpkgs> {} }:
let
test = pkgs.writeTextFile {
name = "weird";
text = ''
#!${pkgs.stdenv.shell}
echo RUNNING
echo contents > testfile
'';
};
in
pkgs.stdenv.mkDerivation {
name = "test";
phases = "installPhase";
buildInputs = [ test ];
installPhase = "cp testfile $out";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment