diff --git a/flake.lock b/flake.lock index 9b7db906..ffa3ce0e 100644 --- a/flake.lock +++ b/flake.lock @@ -66,11 +66,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1680390120, - "narHash": "sha256-RyDJcG/7mfimadlo8vO0QjW22mvYH1+cCqMuigUntr8=", + "lastModified": 1681005198, + "narHash": "sha256-5LrnBeXR7Hv8OXh6eany7br4qBW+ZNl4LKf1CJu9zbg=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "c1e2efaca8d8a3db6a36f652765d6c6ba7bb8fae", + "rev": "e45cc0138829ad86e7ff17a76acf2d05e781e30a", "type": "github" }, "original": { @@ -82,11 +82,11 @@ }, "nixpkgs-unpatched": { "locked": { - "lastModified": 1680976873, - "narHash": "sha256-zWSTl2cYSwV9mWttlR3clwJ5SBhJj+0p+zl43MNS1xA=", + "lastModified": 1681236078, + "narHash": "sha256-6taUbMK380Ul35hOP1PlPoE4ezZrcdNm9afewkSNYfY=", "owner": "nixos", "repo": "nixpkgs", - "rev": "df6db8c5b0b94b85e578d05b37e5bf3b24555638", + "rev": "4e2c1815ed1a40825c52e30dc993bf3a3c136104", "type": "github" }, "original": { @@ -113,11 +113,11 @@ "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1680404136, - "narHash": "sha256-06D8HJmRv4DdpEQGblMhx2Vm81SBWM61XBBIx7QQfo0=", + "lastModified": 1681209176, + "narHash": "sha256-wyQokPpkNZnsl/bVf8m1428tfA0hJ0w/qexq4EizhTc=", "owner": "Mic92", "repo": "sops-nix", - "rev": "b93eb910f768f9788737bfed596a598557e5625d", + "rev": "00d5fd73756d424de5263b92235563bc06f2c6e1", "type": "github" }, "original": { diff --git a/nixpatches/2023-03-03-qtbase-cross-compile.patch b/nixpatches/2023-03-03-qtbase-cross-compile.patch index d12beb13..f7289223 100644 --- a/nixpatches/2023-03-03-qtbase-cross-compile.patch +++ b/nixpatches/2023-03-03-qtbase-cross-compile.patch @@ -27,8 +27,8 @@ index 28180d3b0ca..f14c73b10ee 100644 if [[ -z "$dontSyncQt" && -f sync.profile ]]; then # FIXME: this probably breaks crosscompiling as it's not from nativeBuildInputs # I don't know how to get /libexec from nativeBuildInputs to work, it's not under /bin -- ${lib.getDev self.qtbase}/libexec/syncqt.pl -version "''${version%%-*}" -+ perl ${lib.getDev self.qtbase}/libexec/syncqt.pl -version "''${version%%-*}" +- ${lib.getDev qtbase}/libexec/syncqt.pl -version "''${version%%-*}" ++ perl ${lib.getDev qtbase}/libexec/syncqt.pl -version "''${version%%-*}" fi ''; diff --git a/nixpatches/2023-03-10-hase.patch b/nixpatches/2023-03-10-hase.patch deleted file mode 100644 index 0f863026..00000000 --- a/nixpatches/2023-03-10-hase.patch +++ /dev/null @@ -1,178 +0,0 @@ -diff --git a/pkgs/development/libraries/sparrow3d/default.nix b/pkgs/development/libraries/sparrow3d/default.nix -new file mode 100644 -index 00000000000..331a02efc5f ---- /dev/null -+++ b/pkgs/development/libraries/sparrow3d/default.nix -@@ -0,0 +1,53 @@ -+{ lib -+, fetchFromGitHub -+, pkg-config -+, SDL -+, SDL_image -+, SDL_mixer -+, SDL_net -+, SDL_ttf -+, stdenv -+}: -+ -+stdenv.mkDerivation (finalAttrs: { -+ pname = "sparrow3d"; -+ version = "2020-10-06"; -+ -+ src = fetchFromGitHub { -+ owner = "theZiz"; -+ repo = "sparrow3d"; -+ rev = "2033349d7adeba34bda2c442e1fec22377471134"; -+ hash = "sha256-28j5nbTYBrMN8BQ6XrTlO1D8Viw+RiT3MAl99BAbhR4="; -+ }; -+ -+ nativeBuildInputs = [ -+ pkg-config -+ ]; -+ -+ propagatedBuildInputs = [ -+ SDL.dev -+ SDL_image -+ SDL_ttf -+ SDL_mixer -+ SDL_net -+ ]; -+ -+ postConfigure = '' -+ NIX_CFLAGS_COMPILE=$(pkg-config --cflags SDL_image SDL_ttf SDL_mixer SDL_net) -+ ''; -+ -+ installPhase = '' -+ mkdir -p $out/{include,lib/pkgconfig} -+ cp sparrow*.h $out/include -+ cp libsparrow{3d,Net,Sound}.so $out/lib -+ substituteAll ${./sparrow3d.pc.in} $out/lib/pkgconfig/sparrow3d.pc -+ ''; -+ -+ meta = with lib; { -+ description = "a software renderer for different open handhelds like the gp2x, wiz, caanoo and pandora"; -+ homepage = "https://github.com/theZiz/sparrow3d"; -+ license = licenses.lgpl21; -+ maintainers = with maintainers; [ colinsane ]; -+ platforms = [ "x86_64-linux" ]; -+ }; -+}) -diff --git a/pkgs/development/libraries/sparrow3d/sparrow3d.pc.in b/pkgs/development/libraries/sparrow3d/sparrow3d.pc.in -new file mode 100644 -index 00000000000..046e174ea97 ---- /dev/null -+++ b/pkgs/development/libraries/sparrow3d/sparrow3d.pc.in -@@ -0,0 +1,17 @@ -+prefix=@out@ -+includedir=${prefix}/include -+libdir=${prefix}/lib -+ -+Name: sparrow3d -+Description: a software renderer for different open handhelds like the gp2x, wiz, caanoo and pandora -+URL: https://github.com/theZiz/sparrow3d -+Version: @version@ -+Requires: \ -+ sdl \ -+ SDL_image \ -+ SDL_ttf \ -+ SDL_mixer \ -+ SDL_net -+Cflags: -isystem${includedir} -+Libs: -L${libdir} -lsparrow3d -lsparrowNet -lsparrowSound -+ -diff --git a/pkgs/games/hase/default.nix b/pkgs/games/hase/default.nix -new file mode 100644 -index 00000000000..794b6d017ae ---- /dev/null -+++ b/pkgs/games/hase/default.nix -@@ -0,0 +1,49 @@ -+{ lib -+, fetchFromGitHub -+, pkg-config -+, stdenv -+, sparrow3d -+, zlib -+}: -+ -+stdenv.mkDerivation { -+ pname = "hase"; -+ version = "2020-10-06"; -+ -+ src = fetchFromGitHub { -+ owner = "theZiz"; -+ repo = "hase"; -+ rev = "31d6840cdf0c72fc459f10402dae7726096b2974"; -+ hash = "sha256-d9So3E8nCQJ1/BdlwMkGbaFPT9mkX1VzlDGKp71ptEE="; -+ }; -+ patches = [ ./prefer-dynamic.patch ]; -+ -+ nativeBuildInputs = [ -+ pkg-config -+ ]; -+ -+ buildInputs = [ -+ sparrow3d -+ zlib -+ ]; -+ -+ buildPhase = '' -+ NIX_CFLAGS_COMPILE=$(pkg-config --cflags sparrow3d zlib) -+ mkdir -p $out/{bin,share/applications,share/pixmaps} -+ # build and install are one step, and inseparable without patching -+ ./install.sh $out -+ ''; -+ -+ postFixup = '' -+ substituteInPlace "$out/share/applications/hase.desktop" \ -+ --replace "Exec=hase" "Exec=$out/bin/hase" -+ ''; -+ -+ meta = with lib; { -+ description = "Hase is an open source gravity based artillery shooter. It is similar to Worms, Hedgewars or artillery, but the gravity force and direction depends on the mass nearby. It is optimized for mobile game consoles like the GP2X, Open Pandora or GCW Zero"; -+ homepage = "http://ziz.gp2x.de/hase/"; -+ license = licenses.gpl3; -+ maintainers = with maintainers; [ colinsane ]; -+ platforms = [ "x86_64-linux" ]; -+ }; -+} -diff --git a/pkgs/games/hase/prefer-dynamic.patch b/pkgs/games/hase/prefer-dynamic.patch -new file mode 100644 -index 00000000000..ab36e6b2b3d ---- /dev/null -+++ b/pkgs/games/hase/prefer-dynamic.patch -@@ -0,0 +1,13 @@ -+diff --git a/Makefile b/Makefile -+index 95d894e..3c561c1 100644 -+--- a/Makefile -++++ b/Makefile -+@@ -35,7 +35,7 @@ endif -+ LIB += -L$(SPARROW_LIB) -+ INCLUDE += -I$(SPARROW_FOLDER) -+ -+-HASE_STATIC = $(SPARROW_LIB)/$(SPARROW3D_STATIC_LIB) $(SPARROW_LIB)/$(SPARROWSOUND_STATIC_LIB) $(SPARROW_LIB)/$(SPARROWNET_STATIC_LIB) $(STATIC) -++DYNAMIC += -lsparrow3d -lsparrowSound -lsparrowNet -+ -+ ifneq ($(TARGET),win32) -+ DYNAMIC += -lz -diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix -index 521b00eb5f5..31052251314 100644 ---- a/pkgs/top-level/all-packages.nix -+++ b/pkgs/top-level/all-packages.nix -@@ -23550,6 +23550,8 @@ with pkgs; - - spaceship-prompt = callPackage ../shells/zsh/spaceship-prompt {}; - -+ sparrow3d = callPackage ../development/libraries/sparrow3d {}; -+ - spdk = callPackage ../development/libraries/spdk { }; - - speechd = callPackage ../development/libraries/speechd { }; -@@ -35570,6 +35572,8 @@ with pkgs; - - harmonist = callPackage ../games/harmonist { }; - -+ hase = callPackage ../games/hase { }; -+ - hedgewars = libsForQt5.callPackage ../games/hedgewars { - inherit (haskellPackages) ghcWithPackages; - }; diff --git a/nixpatches/list.nix b/nixpatches/list.nix index 25e6fd01..a25f12b2 100644 --- a/nixpatches/list.nix +++ b/nixpatches/list.nix @@ -32,9 +32,6 @@ # TODO: why doesn't this apply? # ./2023-03-04-ccache-cross-fix.patch - # TODO: point to upstream PR - ./2023-03-10-hase.patch - # 2023-03-28: jellyfin-media-player: 1.8.1 -> 1.9.0 # TODO: i should review/approve this PR if it works (fetchpatch {