Package in nix

This commit is contained in:
soup 2024-12-14 19:05:04 -05:00
parent e92a7738ae
commit 92f34c49b0
Signed by: soup
SSH key fingerprint: SHA256:GYxje8eQkJ6HZKzVWDdyOUF1TyDiprruGhE0Ym8qYDY
2 changed files with 7 additions and 5 deletions

View file

@ -10,15 +10,17 @@
packages.default = pkgs.stdenv.mkDerivation {
pname = "cgen";
version = "0";
src = builtins.fetchGit {
url = ./.;
submodules = true;
};
src = ./.;
nativeBuildInputs = with pkgs; [
gcc14
tree-sitter
tinyxxd
];
installPhase = ''
mkdir -p $out/bin/
cp build/bin/cgen $out/bin/cgen
'';
};
devShells.default =

View file

@ -128,7 +128,7 @@ void gen_enum_strs() {
int main(int argc, char **argv) {
if (argc != 2) {
printf("%s", USAGE);
printf("%s\n", USAGE);
exit(1);
}