pkgs: package setris
This commit is contained in:
parent
6a4a6e20fe
commit
38f64255a0
2 changed files with 47 additions and 0 deletions
|
@ -15,5 +15,7 @@ final: prev: {
|
||||||
|
|
||||||
unbted = final.callPackage ./unbted.nix { };
|
unbted = final.callPackage ./unbted.nix { };
|
||||||
|
|
||||||
|
setris = final.callPackage ./setris.nix { };
|
||||||
|
|
||||||
substituteSubset = final.callPackage ./substitute-subset.nix { };
|
substituteSubset = final.callPackage ./substitute-subset.nix { };
|
||||||
}
|
}
|
||||||
|
|
45
pkgs/setris.nix
Normal file
45
pkgs/setris.nix
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
{ stdenv
|
||||||
|
, lib
|
||||||
|
, fetchurl
|
||||||
|
, openjdk17
|
||||||
|
, gtk3
|
||||||
|
, makeWrapper
|
||||||
|
, wrapGAppsHook
|
||||||
|
}:
|
||||||
|
|
||||||
|
stdenv.mkDerivation (self: rec {
|
||||||
|
pname = "setris";
|
||||||
|
version = "1.2";
|
||||||
|
|
||||||
|
# Since the file cannot be directly fetched, it must be added to the store manually
|
||||||
|
# Add the file to the store with `nix store add-file Setris-1.2_LINUX.tar.gz`
|
||||||
|
src = fetchurl {
|
||||||
|
url = "download-from-itch/Setris-1.2_LINUX.tar.gz";
|
||||||
|
sha256 = "sha256-slGBCJdMp+NjaPRf6x31Xi8T9L3kSR0vN39vawFHw2w=";
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
gtk3
|
||||||
|
makeWrapper
|
||||||
|
wrapGAppsHook
|
||||||
|
];
|
||||||
|
|
||||||
|
unpackPhase = ''
|
||||||
|
tar xvf $src
|
||||||
|
'';
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -pv $out/share/java $out/bin
|
||||||
|
cp setris-desktop-1.0-SNAPSHOT-jar-with-dependencies.jar $out/share/java/${self.pname}.jar
|
||||||
|
makeWrapper ${openjdk17}/bin/java $out/bin/${self.pname} \
|
||||||
|
--add-flags "-jar $out/share/java/${self.pname}.jar"
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
homepage = "https://mslivo.itch.io/setris";
|
||||||
|
description = "A Tetris-like game where the blocks turn into sand";
|
||||||
|
license = licenses.unfree;
|
||||||
|
platforms = platforms.all; # Uses a 'universal' jar
|
||||||
|
maintainers = with maintainers; [ infinidoge ];
|
||||||
|
};
|
||||||
|
})
|
Loading…
Add table
Add a link
Reference in a new issue