feat: project 1
This commit is contained in:
parent
d6ef47cff4
commit
f04d70f615
16 changed files with 702 additions and 0 deletions
23
project1/default.nix
Normal file
23
project1/default.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
let
|
||||
basicC = subdir: name: { stdenv }:
|
||||
stdenv.mkDerivation {
|
||||
inherit name;
|
||||
src = ./.;
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
gcc ${subdir}/${name}.c -o ${name}.bin
|
||||
runHook postBuild
|
||||
'';
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
mkdir -p $out/bin
|
||||
install ${name}.bin $out/bin/${name}
|
||||
runHook postInstall
|
||||
'';
|
||||
};
|
||||
in {
|
||||
p1-phase1 = basicC "phase1" "phase1";
|
||||
p1-phase2 = basicC "phase2" "phase2";
|
||||
p1-phase3 = basicC "phase3" "phase3";
|
||||
p1-phase4 = basicC "phase4" "phase4";
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue