about summary refs log tree commit diff
path: root/nixpkgs/pkgs/games/among-sus/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/games/among-sus/default.nix')
-rw-r--r--nixpkgs/pkgs/games/among-sus/default.nix30
1 files changed, 30 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/games/among-sus/default.nix b/nixpkgs/pkgs/games/among-sus/default.nix
new file mode 100644
index 000000000000..be9ecc7adf57
--- /dev/null
+++ b/nixpkgs/pkgs/games/among-sus/default.nix
@@ -0,0 +1,30 @@
+{ lib, stdenv, fetchFromSourcehut, port ? "1234" }:
+
+stdenv.mkDerivation {
+  pname = "among-sus-unstable";
+  version = "2021-05-19";
+
+  src = fetchFromSourcehut {
+    owner = "~martijnbraam";
+    repo = "among-sus";
+    rev = "554e60bf52e3fa931661b9414189a92bb8f69d78";
+    sha256 = "0j1158nczhvy5i1ykvzvhlv4ndhibgng0dq1lw2bmi8q6k1q1s0w";
+  };
+
+  patchPhase = ''
+    sed -i 's/port = 1234/port = ${port}/g' main.c
+  '';
+
+  installPhase = ''
+    mkdir -p $out/bin
+    install -Dm755 among-sus $out/bin
+  '';
+
+  meta = with lib; {
+    homepage = "https://git.sr.ht/~martijnbraam/among-sus";
+    description = "Among us, but it's a text adventure";
+    license = licenses.agpl3Plus;
+    maintainers = [ maintainers.eyjhb ];
+    platforms = platforms.unix;
+  };
+}