aboutsummaryrefslogtreecommitdiff
path: root/my-pkgs
diff options
context:
space:
mode:
authorDylan <boss@tehbox.org>2026-04-29 23:14:04 +1200
committerDylan <boss@tehbox.org>2026-04-29 23:14:04 +1200
commitda3a4174ae0a287871e36899893abe9c858ad7e5 (patch)
treefeb0b8bb271a7c2a2685c7601f39caabc6a3cbfb /my-pkgs
parent920ccb1300240961f7559d68e8f9b11a81eb90db (diff)
downloadnixos-configuration-da3a4174ae0a287871e36899893abe9c858ad7e5.tar.gz
nixos-configuration-da3a4174ae0a287871e36899893abe9c858ad7e5.zip
feat: Added stk-installers package
Package just downloads the installers from the github releases then puts them in the right places for hosting them with apache
Diffstat (limited to 'my-pkgs')
-rw-r--r--my-pkgs/stk-installers.nix36
1 files changed, 36 insertions, 0 deletions
diff --git a/my-pkgs/stk-installers.nix b/my-pkgs/stk-installers.nix
new file mode 100644
index 0000000..be16e9b
--- /dev/null
+++ b/my-pkgs/stk-installers.nix
@@ -0,0 +1,36 @@
+{ stdenv, fetchurl, lib, writeText, ... }:
+stdenv.mkDerivation rec {
+ pname = "stk-installers";
+ version = "0.1.0";
+
+ srcs = let
+ releaseHashes = {
+ #"installer-aarch64.exe" = "sha256-orLoDvW+fUDucqY4KcC0DQ4JbA2LaG3RQtaBEjtG6HU=";
+ #"installer-i686.exe" = "sha256-knC7XF6OeY/dQ2VnyjYm+IlJxU8g6s/S395Nr4HZ6Jk=";
+ "installer-x86_64.exe" = "sha256-oSYOu3PdnaE+w+N/Um8p5JSztmwAwF/XB2ezCkSX2V4=";
+ "linux-arm64.tar.gz" = "sha256-lhtLaRtEVHzcrae6OdrRVhpufnZskLIsot8foYqi5Hc=";
+ #"linux-armv7.tar.gz" = "sha256-jQYR2wkIu1j7c5xEfzdIa9fnQFU1wNKAVq35NZB/BzA=";
+ "linux-x86.tar.gz" = "sha256-sT57jnRV7Wa4qC8p1/fOTwXfelM66fRckdfQvqMqOOs=";
+ "linux-x86_64.tar.gz" = "sha256-VwkLbCFj62kfIBBK6XEiBKy7ToNBBZ3uCl/1MV78QBs=";
+ "mac-signed.zip" = "sha256-wmas24pjo/4w9SZS2bdJ9b66Sr655UOC+7k0sAxTswM=";
+ "src.tar.gz" = "sha256-M8+IQeT/QILYC5JIAUKVu76mHRRoPobf8QDjq497J8s=";
+ "win.zip" = "sha256-nffi1n6FYhJ6O7YzAw8b1O53+p5/CuEQiXRzAlr4rNw=";
+ };
+ in
+ lib.attrsets.mapAttrsToList (release: hash: fetchurl {
+ url = "https://github.com/supertuxkart/stk-code/releases/download/1.5/SuperTuxKart-1.5-${release}";
+ sha256 = hash;
+ }) releaseHashes
+ ++ [(writeText "hashes.txt" (builtins.concatStringsSep "\n" (lib.attrsets.mapAttrsToList (release: hash: "SuperTuxKart-1.5-${release} ${hash}") releaseHashes)))];
+
+ sourceRoot = ".";
+
+ unpackPhase = ":";
+
+ installPhase = ''
+mkdir -p $out/srv/www
+for srcFile in $srcs; do
+ cp $srcFile "$out/srv/www/$(stripHash $srcFile)"
+done
+'';
+}