refactor(c): improve flake structure

Co-authored-by: isabelroses <isabel@isabelroses.com>
This commit is contained in:
Sigmanificient 2024-05-07 00:21:40 +02:00
parent e2607d77cc
commit 57769ca9ed
2 changed files with 17 additions and 13 deletions

13
c/default.nix Normal file
View 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
'';
}

View file

@ -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 = {