forked from auxolotl/templates
refactor(c): improve flake structure
Co-authored-by: isabelroses <isabel@isabelroses.com>
This commit is contained in:
parent
e2607d77cc
commit
57769ca9ed
13
c/default.nix
Normal file
13
c/default.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{ stdenv, gnumake }:
|
||||
stdenv.mkDerivation {
|
||||
name = "hello";
|
||||
|
||||
src = ./.;
|
||||
nativeBuildInputs = [ gnumake ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
installPhase = ''
|
||||
install -D hello $out/bin/hello --mode 0755
|
||||
'';
|
||||
}
|
17
c/flake.nix
17
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 = {
|
||||
|
|
Loading…
Reference in a new issue