playground/flake.nix
Jan-Erik Rediger 908991eb68
All checks were successful
/ Publish (push) Successful in 33s
CI: Run a nix task
2023-09-25 22:54:26 +02:00

25 lines
721 B
Nix

{
description = "A flake for building Hello World";
inputs.nixpkgs.url = github:NixOS/nixpkgs;
outputs = { self, nixpkgs }: {
defaultPackage.x86_64-linux =
with import nixpkgs { system = "x86_64-linux"; };
stdenv.mkDerivation {
name = "hello";
src = self;
buildPhase = "cc -o hello ./hello.c";
installPhase = "mkdir -p $out/bin; install -t $out/bin hello";
};
defaultPackage.aarch64-darwin =
with import nixpkgs { system = "aarch64-darwin"; };
stdenv.mkDerivation {
name = "hello";
src = self;
buildPhase = "cc -o hello ./hello.c";
installPhase = "mkdir -p $out/bin; install -t $out/bin hello";
};
};
}