diff --git a/c/default.nix b/c/default.nix new file mode 100644 index 0000000..444469b --- /dev/null +++ b/c/default.nix @@ -0,0 +1,13 @@ +{ stdenv, gnumake }: +stdenv.mkDerivation { + name = "hello"; + + src = ./.; + nativeBuildInputs = [ gnumake ]; + + enableParallelBuilding = true; + + installPhase = '' + install -D hello $out/bin/hello --mode 0755 + ''; +} diff --git a/c/flake.nix b/c/flake.nix index ed72ed7..d1fa496 100644 --- a/c/flake.nix +++ b/c/flake.nix @@ -1,5 +1,5 @@ { - description = "Templates for getting started with Aux"; + description = "Aux template for C project"; inputs.nixpkgs.url = "github:auxolotl/nixpkgs/nixos-unstable"; @@ -28,20 +28,11 @@ packages = forAllSystems (pkgs: rec { default = hello; - hello = pkgs.stdenv.mkDerivation rec { - name = "hello"; - - src = ./.; - nativeBuildInputs = [ pkgs.gnumake ]; - - enableParallelBuilding = true; - V = 1; - installPhase = '' - install -D ${name} $out/bin/${name} --mode 0755 - ''; - }; + hello = pkgs.callPackage ./default.nix { }; }); + overlays.default = final: prev: { hello = final.callPackage ./default.nix { }; }; + apps = forAllSystems (pkgs: rec { default = hello; hello = {