about summary refs log tree commit diff
path: root/nixpkgs/pkgs/by-name/aa
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2023-12-15 19:32:38 +0100
committerAlyssa Ross <hi@alyssa.is>2023-12-15 19:32:38 +0100
commit6b8e2555ef013b579cda57025b17d662e0f1fe1f (patch)
tree5a83c673af26c9976acd5a5dfa20e09e06898047 /nixpkgs/pkgs/by-name/aa
parent66ca7a150b5c051f0728f13134e6265cc46f370c (diff)
parent02357adddd0889782362d999628de9d309d202dc (diff)
downloadnixlib-6b8e2555ef013b579cda57025b17d662e0f1fe1f.tar
nixlib-6b8e2555ef013b579cda57025b17d662e0f1fe1f.tar.gz
nixlib-6b8e2555ef013b579cda57025b17d662e0f1fe1f.tar.bz2
nixlib-6b8e2555ef013b579cda57025b17d662e0f1fe1f.tar.lz
nixlib-6b8e2555ef013b579cda57025b17d662e0f1fe1f.tar.xz
nixlib-6b8e2555ef013b579cda57025b17d662e0f1fe1f.tar.zst
nixlib-6b8e2555ef013b579cda57025b17d662e0f1fe1f.zip
Merge branch 'nixos-unstable-small' of https://github.com/NixOS/nixpkgs
Diffstat (limited to 'nixpkgs/pkgs/by-name/aa')
-rw-r--r--nixpkgs/pkgs/by-name/aa/aaaaxy/package.nix96
1 files changed, 96 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/by-name/aa/aaaaxy/package.nix b/nixpkgs/pkgs/by-name/aa/aaaaxy/package.nix
new file mode 100644
index 000000000000..fcd71f6c6615
--- /dev/null
+++ b/nixpkgs/pkgs/by-name/aa/aaaaxy/package.nix
@@ -0,0 +1,96 @@
+{ lib
+, fetchFromGitHub
+, buildGoModule
+, alsa-lib
+, libglvnd
+, libX11
+, libXcursor
+, libXext
+, libXi
+, libXinerama
+, libXrandr
+, libXxf86vm
+, go-licenses
+, pkg-config
+, zip
+, advancecomp
+, nixosTests
+}:
+
+buildGoModule rec {
+  pname = "aaaaxy";
+  version = "1.4.119";
+
+  src = fetchFromGitHub {
+    owner = "divVerent";
+    repo = pname;
+    rev = "v${version}";
+    hash = "sha256-M+HNYQl53vQZdKn/CyF5OZPyKGq/4A9DPoDV3fRdWMY=";
+    fetchSubmodules = true;
+  };
+
+  vendorHash = "sha256-NoWfCn9P/i/8Xv0w2wqTFG3yoayGzc1TyF02zANP7Rg=";
+
+  buildInputs = [
+    alsa-lib
+    libglvnd
+    libX11 libXcursor libXext libXi libXinerama libXrandr
+    libXxf86vm
+  ];
+
+  nativeBuildInputs = [
+    go-licenses
+    pkg-config
+    zip
+    advancecomp
+  ];
+
+  outputs = [ "out" "testing_infra" ];
+
+  postPatch = ''
+    # Without patching, "go run" fails with the error message:
+    # package github.com/google/go-licenses: no Go files in /build/source/vendor/github.com/google/go-licenses
+    substituteInPlace scripts/build-licenses.sh --replace \
+      '$GO run ''${GO_FLAGS} github.com/google/go-licenses' 'go-licenses'
+
+    patchShebangs scripts/
+    substituteInPlace scripts/regression-test-demo.sh \
+      --replace 'sh scripts/run-timedemo.sh' "$testing_infra/scripts/run-timedemo.sh"
+  '';
+
+  makeFlags = [
+    "BUILDTYPE=release"
+  ];
+
+  buildPhase = ''
+    runHook preBuild
+    AAAAXY_BUILD_USE_VERSION_FILE=true make $makeFlags
+    runHook postBuild
+  '';
+
+  postInstall = ''
+    install -Dm755 'aaaaxy' -t "$out/bin/"
+    install -Dm444 'aaaaxy.svg' -t "$out/share/icons/hicolor/scalable/apps/"
+    install -Dm644 'aaaaxy.png' -t "$out/share/icons/hicolor/128x128/apps/"
+    install -Dm644 'aaaaxy.desktop' -t "$out/share/applications/"
+    install -Dm644 'io.github.divverent.aaaaxy.metainfo.xml' -t "$out/share/metainfo/"
+
+    install -Dm755 'scripts/run-timedemo.sh' -t "$testing_infra/scripts/"
+    install -Dm755 'scripts/regression-test-demo.sh' -t "$testing_infra/scripts/"
+    install -Dm644 'assets/demos/benchmark.dem' -t "$testing_infra/assets/demos/"
+  '';
+
+  passthru.tests = {
+    aaaaxy = nixosTests.aaaaxy;
+  };
+
+  strictDeps = true;
+
+  meta = with lib; {
+    description = "A nonlinear 2D puzzle platformer taking place in impossible spaces";
+    homepage = "https://divverent.github.io/aaaaxy/";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ Luflosi ];
+    platforms = platforms.linux;
+  };
+}