refactor: reorganize directory structure
This commit is contained in:
parent
433a4f2c0d
commit
d4913ac8df
5 changed files with 5 additions and 5 deletions
22
assignment1/default.nix
Normal file
22
assignment1/default.nix
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
let
|
||||
basic-c = name: { stdenv }:
|
||||
stdenv.mkDerivation {
|
||||
inherit name;
|
||||
src = ./.;
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
gcc part2/${name}.c -o ${name}
|
||||
runHook postBuild
|
||||
'';
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
mkdir -p $out/bin
|
||||
install ${name} $out/bin/
|
||||
runHook postInstall
|
||||
'';
|
||||
};
|
||||
in {
|
||||
a1-hello = basic-c "hello";
|
||||
a1-employee = basic-c "employee";
|
||||
a1-logwriter = basic-c "logwriter";
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue