aboutsummaryrefslogtreecommitdiff
path: root/modules/my-pkgs
diff options
context:
space:
mode:
authorDylan <boss@tehbox.org>2026-10-17 22:02:09 +1300
committerDylan <boss@tehbox.org>2026-10-17 22:04:40 +1300
commit008b591a0a5942ae42f4c07a5abbee4dbd2d0743 (patch)
tree0ae88a36bc00ede3b43b31489adae633dc54e8cd /modules/my-pkgs
parent280e1bbe5e733128a451260685cc8ecd10a042a3 (diff)
downloadnixos-configuration-008b591a0a5942ae42f4c07a5abbee4dbd2d0743.tar.gz
nixos-configuration-008b591a0a5942ae42f4c07a5abbee4dbd2d0743.zip
feat: Formatting changes
Diffstat (limited to 'modules/my-pkgs')
-rw-r--r--modules/my-pkgs/adom.nix124
-rw-r--r--modules/my-pkgs/default.nix23
-rw-r--r--modules/my-pkgs/stk-installers.nix92
3 files changed, 139 insertions, 100 deletions
diff --git a/modules/my-pkgs/adom.nix b/modules/my-pkgs/adom.nix
index 0c2ad03..ebc2e77 100644
--- a/modules/my-pkgs/adom.nix
+++ b/modules/my-pkgs/adom.nix
@@ -1,59 +1,77 @@
{
- perSystem =
- { pkgs, ... }:
- {
- packages.adom = pkgs.callPackage (
- { stdenv, fetchurl, autoPatchelfHook, makeDesktopItem, makeWrapper, ncurses5, libtinfo, SDL2, SDL2_image, SDL2_mixer, SDL2_net, SDL2_ttf, luajit} :
+ perSystem =
+ { pkgs, ... }:
+ {
+ packages.adom = pkgs.callPackage (
+ {
+ stdenv,
+ fetchurl,
+ autoPatchelfHook,
+ makeDesktopItem,
+ makeWrapper,
+ ncurses5,
+ libtinfo,
+ SDL2,
+ SDL2_image,
+ SDL2_mixer,
+ SDL2_net,
+ SDL2_ttf,
+ luajit,
+ }:
- stdenv.mkDerivation rec {
- pname = "adom";
- version = "3.3.3";
- src = fetchurl {
- url = "https://sjc4.dl.dbolical.com/dl/2019/01/29/adom_noteye_linux_ubuntu_64_${version}.tar.gz?st=PcXL3PZSxDxr6H6v58PFfw==&e=1750223221";
- hash = "sha256-7c39tEPlrpWIL6QH0BIOLLrFFIlhEHPw5F3knMUh+BA=";
- };
+ stdenv.mkDerivation rec {
+ pname = "adom";
+ version = "3.3.3";
+ src = fetchurl {
+ url = "https://sjc4.dl.dbolical.com/dl/2019/01/29/adom_noteye_linux_ubuntu_64_${version}.tar.gz?st=PcXL3PZSxDxr6H6v58PFfw==&e=1750223221";
+ hash = "sha256-7c39tEPlrpWIL6QH0BIOLLrFFIlhEHPw5F3knMUh+BA=";
+ };
- nativeBuildInputs = [
- autoPatchelfHook
- makeWrapper
- ];
+ nativeBuildInputs = [
+ autoPatchelfHook
+ makeWrapper
+ ];
- buildInputs = [
- (ncurses5.override { unicodeSupport = false; })
- ncurses5
- SDL2
- SDL2_image
- SDL2_mixer
- SDL2_net
- SDL2_ttf
- luajit
- stdenv.cc.cc.lib
- ];
+ buildInputs = [
+ (ncurses5.override { unicodeSupport = false; })
+ ncurses5
+ SDL2
+ SDL2_image
+ SDL2_mixer
+ SDL2_net
+ SDL2_ttf
+ luajit
+ stdenv.cc.cc.lib
+ ];
- sourceRoot = "adom";
- installPhase = let desktopEntry = makeDesktopItem {
- name = "adom";
- desktopName = "ADOM";
- exec = "OUT_DIR/bin/adom";
- #path = "OUT_DIR/share";
- }; in ''
- runHook preInstall
- install -m755 -D adom $out/bin/adom
- wrapProgram $out/bin/adom \
- --chdir $out/share
- install -m644 -D lib/libnoteye.so $out/lib/libnoteye.so
- mkdir -p $out/share
- cp -r common $out/share/
- cp -r docs $out/share/
- cp -r games $out/share/
- cp -r gfx $out/share/
- cp -r licenses $out/share/
- cp -r sound $out/share/
- mkdir -p $out/share/applications
- sed -e "s|OUT_DIR|$out|g" ${desktopEntry}/share/applications/adom.desktop > $out/share/applications/adom.desktop
- runHook postInstall
-'';
- }
- ) { };
- };
+ sourceRoot = "adom";
+ installPhase =
+ let
+ desktopEntry = makeDesktopItem {
+ name = "adom";
+ desktopName = "ADOM";
+ exec = "OUT_DIR/bin/adom";
+ #path = "OUT_DIR/share";
+ };
+ in
+ ''
+ runHook preInstall
+ install -m755 -D adom $out/bin/adom
+ wrapProgram $out/bin/adom \
+ --chdir $out/share
+ install -m644 -D lib/libnoteye.so $out/lib/libnoteye.so
+ mkdir -p $out/share
+ cp -r common $out/share/
+ cp -r docs $out/share/
+ cp -r games $out/share/
+ cp -r gfx $out/share/
+ cp -r licenses $out/share/
+ cp -r sound $out/share/
+ mkdir -p $out/share/applications
+ sed -e "s|OUT_DIR|$out|g" ${desktopEntry}/share/applications/adom.desktop > $out/share/applications/adom.desktop
+ runHook postInstall
+ '';
+ }
+ ) { };
+ };
}
diff --git a/modules/my-pkgs/default.nix b/modules/my-pkgs/default.nix
index fb227d0..85ad44d 100644
--- a/modules/my-pkgs/default.nix
+++ b/modules/my-pkgs/default.nix
@@ -1,12 +1,17 @@
{ inputs, ... }:
{
- flake.modules.nixos.my-pkgs =
- { config, pkgs, lib, ... }:
- {
- nixpkgs.overlays = [
- (final: prev: {
- adom = inputs.self.packages.${final.stdenv.hostPlatform.system}.adom;
- })
- ];
- };
+ flake.modules.nixos.my-pkgs =
+ {
+ config,
+ pkgs,
+ lib,
+ ...
+ }:
+ {
+ nixpkgs.overlays = [
+ (final: prev: {
+ adom = inputs.self.packages.${final.stdenv.hostPlatform.system}.adom;
+ })
+ ];
+ };
}
diff --git a/modules/my-pkgs/stk-installers.nix b/modules/my-pkgs/stk-installers.nix
index 0558733..10eccd8 100644
--- a/modules/my-pkgs/stk-installers.nix
+++ b/modules/my-pkgs/stk-installers.nix
@@ -1,44 +1,60 @@
{
- perSystem =
- { pkgs, ... }:
- {
- packages.stk-installers = pkgs.callPackage (
- { stdenv, fetchurl, lib, writeText, ... }:
- stdenv.mkDerivation rec {
- pname = "stk-installers";
- version = "0.1.0";
+ perSystem =
+ { pkgs, ... }:
+ {
+ packages.stk-installers = pkgs.callPackage (
+ {
+ 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)))];
+ 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 = ".";
+ sourceRoot = ".";
- unpackPhase = ":";
+ unpackPhase = ":";
- installPhase = ''
-mkdir -p $out/srv/www
-for srcFile in $srcs; do
- cp $srcFile "$out/srv/www/$(stripHash $srcFile)"
-done
-'';
- }
- ) { };
- };
+ installPhase = ''
+ mkdir -p $out/srv/www
+ for srcFile in $srcs; do
+ cp $srcFile "$out/srv/www/$(stripHash $srcFile)"
+ done
+ '';
+ }
+ ) { };
+ };
}