18 lines
278 B
Nix
18 lines
278 B
Nix
# simple.nix
|
|
let
|
|
pkgs = import <nixpkgs> { };
|
|
in
|
|
pkgs.stdenv.mkDerivation {
|
|
name = "hello-nix";
|
|
|
|
src = ./.;
|
|
|
|
buildPhase = ''
|
|
$CC simple.c -o hello_nix
|
|
'';
|
|
|
|
installPhase = ''
|
|
mkdir -p $out/bin
|
|
cp hello_nix $out/bin/hello_nix
|
|
'';
|
|
} |