From 827f639912529589e651da5c35e28881c8e08c1f Mon Sep 17 00:00:00 2001 From: Rose Hogenson Date: Sun, 25 Aug 2024 12:05:01 -0700 Subject: Port to SDL. --- flake.nix | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'flake.nix') diff --git a/flake.nix b/flake.nix index b415c15..dcbd70d 100644 --- a/flake.nix +++ b/flake.nix @@ -22,7 +22,7 @@ # Nixpkgs instantiated for supported system types. nixpkgsFor = forAllSystems (system: import nixpkgs { inherit system; }); - deps = pkgs: with pkgs; [ libGL xorg.libXi xorg.libXcursor xorg.libXrandr xorg.libXinerama wayland libxkbcommon ]; + deps = pkgs: with pkgs; [ SDL2_mixer ]; in { @@ -40,13 +40,13 @@ # in the Nix store. src = ./.; - vendorHash = "sha256-ZWMZkwDMSUuuWCInVJ1YTd0W5GJedGrxYugKv1jhx2U="; + vendorHash = "sha256-0GaAPAg940MKg4XOw+WqZBT8jT2gXJIAWsltcHMgzfw="; + nativeBuildInputs = [ pkgs.pkg-config ]; buildInputs = deps pkgs; - proxyVendor = true; - postFixup = '' - patchelf $out/bin/pongo --add-rpath ${pkgs.lib.makeLibraryPath [ pkgs.alsa-lib ]} + preBuild = '' + export CGO_CFLAGS=$(pkg-config --cflags --libs SDL2_mixer) ''; }; }); @@ -58,9 +58,9 @@ in { default = pkgs.mkShell { - nativeBuildInputs = with pkgs; [ go gopls gotools go-tools ] ++ deps pkgs; + nativeBuildInputs = with pkgs; [ go gopls gotools go-tools pkg-config ] ++ deps pkgs; shellHook = '' - export LD_LIBRARY_PATH=${pkgs.lib.makeLibraryPath [ pkgs.alsa-lib ]} + export CGO_CFLAGS=$(pkg-config --cflags --libs SDL2_mixer) ''; }; }); -- cgit v1.3.1