snekim: build with lockfile

This commit is contained in:
Emery Hemingway 2023-11-20 18:18:09 +02:00
parent 6240432c44
commit 5dd133142f
4 changed files with 54 additions and 13 deletions

View File

@ -0,0 +1,40 @@
{
"depends": [
{
"method": "fetchzip",
"packages": [
"nimraylib_now"
],
"path": "/nix/store/vcq7r99jnqh6cj6cdd5227pymk9rnk7g-source",
"ref": "v0.15.0",
"rev": "59154abcbc4cf89b4c674f402db026dea216da7b",
"sha256": "0b6rn9y1d5fpkdf16g0bjrkj39sq1iyq0zlkwi1xmsbq681j5inp",
"srcDir": "src",
"url": "https://github.com/greenfork/nimraylib_now/archive/59154abcbc4cf89b4c674f402db026dea216da7b.tar.gz"
},
{
"method": "fetchzip",
"packages": [
"regex"
],
"path": "/nix/store/vfs4ysdw2kvyp18jwpbvb9wfh1ajz0a9-source",
"ref": "v0.23.0",
"rev": "577c4ec3b235c5fd2653a9c86cbc4a576cfc0869",
"sha256": "0401f9m2m2h6bikl3hffyhaw5fc2nbjdf5mj4z9wckmm9lx9hpkl",
"srcDir": "src",
"url": "https://github.com/nitely/nim-regex/archive/577c4ec3b235c5fd2653a9c86cbc4a576cfc0869.tar.gz"
},
{
"method": "fetchzip",
"packages": [
"unicodedb"
],
"path": "/nix/store/wpilzdf8vdwp7w129yrl821p9qvl3ky3-source",
"ref": "0.12.0",
"rev": "b055310c08db8f879057b4fec15c8301ee93bb2a",
"sha256": "0w77h75vrgp6jiq4dd9i2m4za2cf8qhjkz2wlxiz27yn2isjrndy",
"srcDir": "src",
"url": "https://github.com/nitely/nim-unicodedb/archive/b055310c08db8f879057b4fec15c8301ee93bb2a.tar.gz"
}
]
}

View File

@ -1,22 +1,19 @@
{ lib, nimPackages, fetchFromGitea, raylib }:
{ lib, buildNimPackage, fetchFromGitea, raylib }:
nimPackages.buildNimPackage rec {
buildNimPackage (finalAttrs: {
pname = "snekim";
version = "1.2.0";
nimBinOnly = true;
src = fetchFromGitea {
domain = "codeberg.org";
owner = "annaaurora";
repo = "snekim";
rev = "v${version}";
rev = "v${finalAttrs.version}";
sha256 = "sha256-Qgvq4CkGvNppYFpITCCifOHtVQYRQJPEK3rTJXQkTvI=";
};
strictDeps = true;
buildInputs = [ nimPackages.nimraylib-now raylib ];
lockFile = ./lock.json;
nimFlags = [ "-d:nimraylib_now_shared" ];
@ -25,10 +22,10 @@ nimPackages.buildNimPackage rec {
install -D icons/hicolor/48x48/snekim.svg -t $out/share/icons/hicolor/48x48/apps
'';
meta = with lib; {
meta = {
homepage = "https://codeberg.org/annaaurora/snekim";
description = "A simple implementation of the classic snake game";
license = licenses.lgpl3Only;
maintainers = with maintainers; [ annaaurora ];
license = lib.licenses.lgpl3Only;
maintainers = [ lib.maintainers.annaaurora ];
};
}
})

View File

@ -2814,8 +2814,6 @@ with pkgs;
simplenes = callPackage ../applications/emulators/simplenes { };
snekim = callPackage ../games/snekim { };
snes9x = callPackage ../applications/emulators/snes9x { };
snes9x-gtk = callPackage ../applications/emulators/snes9x {

View File

@ -5,6 +5,7 @@
, libsass
, openssl
, pkg-config
, raylib
, SDL2
, tkrzw
, xorg
@ -31,6 +32,11 @@
buildInputs = buildInputs ++ [ getdns ];
};
nimraylib_now = lockAttrs: finalAttrs:
{ buildInputs ? [ ], ... }: {
buildInputs = buildInputs ++ [ raylib ];
};
sass = lockAttrs: finalAttrs:
{ buildInputs ? [ ], ... }: {
buildInputs = buildInputs ++ [ libsass ];