add my own game to exported pkgs

This commit is contained in:
Frost-Phoenix 2024-01-03 22:41:07 +01:00
parent c8b92d77a8
commit 5cca490b16
3 changed files with 24 additions and 15 deletions

View file

@ -34,6 +34,10 @@
url = "github:catppuccin/starship";
flake = false;
};
imports = [
./pkgs
];
};
outputs = { nixpkgs, self, ...} @ inputs:

View file

@ -15,11 +15,13 @@ lib.mkDerivation rec {
];
# buildPhase = ''
# make release
# '';
buildPhase = ''
make release
'';
installPhase = ''
mkdir -p $out/bin
make install INSTALL_DIR=$out/bin
chmod +x $out/bin/2048
'';
}

View file

@ -1,12 +1,15 @@
rec{
overlay = final: prev:
let
dirContents = builtins.readDir ../pkgs;
genPackage = name: {
inherit name;
value = final.callPackage (../pkgs + "/${name}") { };
};
names = builtins.attrNames dirContents;
in
builtins.listToAttrs (map genPackage names);
}
{ default, ... }:
{
systems = ["x86_64-linux"];
perSystem = {
pkgs,
inputs',
...
}: {
packages = {
_2048 = pkgs.callPackage ./2048 {};
};
};
}