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"; url = "github:catppuccin/starship";
flake = false; flake = false;
}; };
imports = [
./pkgs
];
}; };
outputs = { nixpkgs, self, ...} @ inputs: outputs = { nixpkgs, self, ...} @ inputs:

View file

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

View file

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