From 0286af1762a7f861a52a99d471238b39f9b07144 Mon Sep 17 00:00:00 2001 From: uku Date: Wed, 26 Mar 2025 15:44:23 +0100 Subject: [PATCH 01/23] undertalemodtool: init at 0.7.0.0 --- pkgs/all-packages.nix | 1 + pkgs/undertalemodtool/deps.json | 92 +++++++++++++++++++++++++++++++ pkgs/undertalemodtool/package.nix | 26 +++++++++ 3 files changed, 119 insertions(+) create mode 100644 pkgs/undertalemodtool/deps.json create mode 100644 pkgs/undertalemodtool/package.nix diff --git a/pkgs/all-packages.nix b/pkgs/all-packages.nix index 0de66a0..ca3fb9e 100644 --- a/pkgs/all-packages.nix +++ b/pkgs/all-packages.nix @@ -4,5 +4,6 @@ final: prev: { jaspersoft-studio-community = prev.callPackage ./jaspersoft-studio-community.nix { }; openwebstart = prev.callPackage ./openwebstart.nix { }; shlink = prev.callPackage ./shlink/package.nix { }; + undertalemodtool = prev.callPackage ./undertalemodtool/package.nix { }; vineflower = prev.callPackage ./vineflower.nix { }; } diff --git a/pkgs/undertalemodtool/deps.json b/pkgs/undertalemodtool/deps.json new file mode 100644 index 0000000..0d5b210 --- /dev/null +++ b/pkgs/undertalemodtool/deps.json @@ -0,0 +1,92 @@ +[ + { + "pname": "Fody", + "version": "6.9.1", + "hash": "sha256-yDzLI06oFVNI4wiexSQK114YZlSOoGPTr8LIlr22M8I=" + }, + { + "pname": "Magick.NET-Q8-AnyCPU", + "version": "13.10.0", + "hash": "sha256-mG+aUxfTlipYWDBml3pmMx5ELCJcM7KbDPL0/xlRjPk=" + }, + { + "pname": "Magick.NET.Core", + "version": "13.10.0", + "hash": "sha256-nbWL93wzrqdL57CgKdxOqmeoSeD7HK36TuLWxj1AQy8=" + }, + { + "pname": "Microsoft.CodeAnalysis.Analyzers", + "version": "3.3.4", + "hash": "sha256-qDzTfZBSCvAUu9gzq2k+LOvh6/eRvJ9++VCNck/ZpnE=" + }, + { + "pname": "Microsoft.CodeAnalysis.Common", + "version": "4.11.0", + "hash": "sha256-cX/xgM0VmS+Bsu63KZk2ofjFOOy1mzI+CCVEY6kI+Qk=" + }, + { + "pname": "Microsoft.CodeAnalysis.CSharp", + "version": "4.11.0", + "hash": "sha256-E9jEOjp9g/CFecsc5/QfRKOPXMRpSw0Tf79XsRgL+Mk=" + }, + { + "pname": "Microsoft.CodeAnalysis.CSharp.Scripting", + "version": "4.11.0", + "hash": "sha256-8zooZAPoUIXB4KwI5joPU3QHg1iq4UP+u3g6TTXN+Lg=" + }, + { + "pname": "Microsoft.CodeAnalysis.Scripting.Common", + "version": "4.11.0", + "hash": "sha256-2JC9TipfoAQ1ug4i+PexZemJHFhjnFNv/FqjBIsV6J0=" + }, + { + "pname": "Microsoft.CSharp", + "version": "4.4.1", + "hash": "sha256-7/gsQHWAuFWrcVpVharASTNL+Mvl6Gw+AAw41k0MzXw=" + }, + { + "pname": "Microsoft.CSharp", + "version": "4.7.0", + "hash": "sha256-Enknv2RsFF68lEPdrf5M+BpV1kHoLTVRApKUwuk/pj0=" + }, + { + "pname": "Newtonsoft.Json", + "version": "13.0.3", + "hash": "sha256-hy/BieY4qxBWVVsDqqOPaLy1QobiIapkbrESm6v2PHc=" + }, + { + "pname": "PropertyChanged.Fody", + "version": "4.1.0", + "hash": "sha256-SAId/w7y5RZqMnpnJ6nmMjaPXQIr2h6QsRKZ4yuoYYU=" + }, + { + "pname": "runtime.osx.10.10-x64.CoreCompat.System.Drawing", + "version": "6.0.5.128", + "hash": "sha256-upmM1/1NGfoBrpNfbaAxFBqqDo+vQ5eDkA/WlxUcXdg=" + }, + { + "pname": "SharpZipLib", + "version": "1.4.2", + "hash": "sha256-/giVqikworG2XKqfN9uLyjUSXr35zBuZ2FX2r8X/WUY=" + }, + { + "pname": "System.Collections.Immutable", + "version": "8.0.0", + "hash": "sha256-F7OVjKNwpqbUh8lTidbqJWYi476nsq9n+6k0+QVRo3w=" + }, + { + "pname": "System.CommandLine", + "version": "2.0.0-beta1.21308.1", + "hash": "sha256-14pgyMy3F86XickXZB+AMX6uMTkVvBg5tV90p1G+4yY=" + }, + { + "pname": "System.Memory", + "version": "4.5.4", + "hash": "sha256-3sCEfzO4gj5CYGctl9ZXQRRhwAraMQfse7yzKoRe65E=" + }, + { + "pname": "System.Reflection.Metadata", + "version": "8.0.0", + "hash": "sha256-dQGC30JauIDWNWXMrSNOJncVa1umR1sijazYwUDdSIE=" + } +] diff --git a/pkgs/undertalemodtool/package.nix b/pkgs/undertalemodtool/package.nix new file mode 100644 index 0000000..d935bbe --- /dev/null +++ b/pkgs/undertalemodtool/package.nix @@ -0,0 +1,26 @@ +{ + buildDotnetModule, + dotnetCorePackages, + fetchFromGitHub, +}: +buildDotnetModule rec { + pname = "undertalemodtool"; + version = "0.7.0.0"; + + src = fetchFromGitHub { + owner = "UnderminersTeam"; + repo = "UndertaleModTool"; + tag = version; + hash = "sha256-Ya7M+CBbto/3X0CZbG15XX96i0+bXh9Qxr25dlSXO/8="; + }; + + nugetDeps = ./deps.json; + + dotnet-sdk = dotnetCorePackages.sdk_8_0-bin; + + dotnetRestoreFlags = "UndertaleModCli"; + dotnetBuildFlags = "UndertaleModCli --no-restore"; + dotnetInstallFlags = "UndertaleModCli"; + + meta.mainProgram = "UndertaleModCli"; +} From df916f03ff9bd5144d3afbff81c46b72f3ae3a7f Mon Sep 17 00:00:00 2001 From: uku Date: Fri, 28 Mar 2025 11:09:13 +0100 Subject: [PATCH 02/23] sql-developer: init at 24.3.1.347.1826 --- pkgs/all-packages.nix | 1 + pkgs/sql-developer.nix | 69 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 70 insertions(+) create mode 100644 pkgs/sql-developer.nix diff --git a/pkgs/all-packages.nix b/pkgs/all-packages.nix index 0de66a0..9863104 100644 --- a/pkgs/all-packages.nix +++ b/pkgs/all-packages.nix @@ -4,5 +4,6 @@ final: prev: { jaspersoft-studio-community = prev.callPackage ./jaspersoft-studio-community.nix { }; openwebstart = prev.callPackage ./openwebstart.nix { }; shlink = prev.callPackage ./shlink/package.nix { }; + sql-developer = prev.callPackage ./sql-developer.nix { }; vineflower = prev.callPackage ./vineflower.nix { }; } diff --git a/pkgs/sql-developer.nix b/pkgs/sql-developer.nix new file mode 100644 index 0000000..263f237 --- /dev/null +++ b/pkgs/sql-developer.nix @@ -0,0 +1,69 @@ +{ + lib, + stdenvNoCC, + autoPatchelfHook, + copyDesktopItems, + fetchzip, + file, + gtk2-x11, + gtk3, + makeDesktopItem, + makeWrapper, + temurin-bin-17, + xorg, +}: +stdenvNoCC.mkDerivation (finalAttrs: { + pname = "sql-developer"; + version = "24.3.1.347.1826"; + + src = fetchzip { + url = "https://download.oracle.com/otn_software/java/sqldeveloper/sqldeveloper-${finalAttrs.version}-no-jre.zip"; + hash = "sha256-y32TVnCuLhpHpo2nn8wOV1zV7nuRnBkApSxrOhx7wZg="; + }; + + nativeBuildInputs = [ + autoPatchelfHook + copyDesktopItems + makeWrapper + ]; + + buildInputs = [ + gtk2-x11 + gtk3 + temurin-bin-17 + xorg.libXxf86vm + ]; + + autoPatchelfIgnoreMissingDeps = [ "libav*" ]; + + postBuild = '' + echo "AddVM9OrHigherOption --add-exports=java.desktop/com.sun.java.swing.plaf.gtk=ALL-UNNAMED" >> ide/bin/jdk.conf + ''; + + installPhase = '' + runHook preInstall + + mkdir -p $out/share/sql-developer + cp -r {,.}* $out/share/sql-developer/ + + install -Dm644 icon.png $out/share/pixmaps/sql-developer.png + + makeWrapper $out/share/sql-developer/sqldeveloper.sh $out/bin/sql-developer \ + --set JAVA_HOME ${temurin-bin-17} \ + --prefix PATH : ${lib.makeBinPath [ file ]} + + runHook postInstall + ''; + + desktopItems = [ + (makeDesktopItem { + name = "sql-developer"; + desktopName = "Oracle SQL Developer"; + type = "Application"; + exec = "sql-developer %U"; + icon = "sql-developer"; + }) + ]; + + meta.mainProgram = "sql-developer"; +}) From 403f31d6cf35ab5eb2f6272aef0aeba162fdd68a Mon Sep 17 00:00:00 2001 From: ukubot Date: Mon, 31 Mar 2025 00:01:21 +0000 Subject: [PATCH 03/23] flake.lock: Update MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Flake lock file updates: • Updated input 'nixpkgs': 'github:nixos/nixpkgs/1e5b653dff12029333a6546c11e108ede13052eb?narHash=sha256-G5n%2BFOXLXcRx%2B3hCJ6Rt6ZQyF1zqQ0DL0sWAMn2Nk0w%3D' (2025-03-22) → 'github:nixos/nixpkgs/5e5402ecbcb27af32284d4a62553c019a3a49ea6?narHash=sha256-gWd4urRoLRe8GLVC/3rYRae1h%2BxfQzt09xOfb0PaHSk%3D' (2025-03-27) --- flake.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index 15012bd..7fa58fe 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1742669843, - "narHash": "sha256-G5n+FOXLXcRx+3hCJ6Rt6ZQyF1zqQ0DL0sWAMn2Nk0w=", + "lastModified": 1743095683, + "narHash": "sha256-gWd4urRoLRe8GLVC/3rYRae1h+xfQzt09xOfb0PaHSk=", "owner": "nixos", "repo": "nixpkgs", - "rev": "1e5b653dff12029333a6546c11e108ede13052eb", + "rev": "5e5402ecbcb27af32284d4a62553c019a3a49ea6", "type": "github" }, "original": { From ef787c2cb81e02d1f5ba5efc8728a60300300b89 Mon Sep 17 00:00:00 2001 From: ukubot Date: Mon, 7 Apr 2025 00:01:29 +0000 Subject: [PATCH 04/23] flake.lock: Update MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Flake lock file updates: • Updated input 'nixpkgs': 'github:nixos/nixpkgs/5e5402ecbcb27af32284d4a62553c019a3a49ea6?narHash=sha256-gWd4urRoLRe8GLVC/3rYRae1h%2BxfQzt09xOfb0PaHSk%3D' (2025-03-27) → 'github:nixos/nixpkgs/42a1c966be226125b48c384171c44c651c236c22?narHash=sha256-rpqepOZ8Eo1zg%2BKJeWoq1HAOgoMCDloqv5r2EAa9TSA%3D' (2025-04-05) --- flake.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index 7fa58fe..0d680a2 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1743095683, - "narHash": "sha256-gWd4urRoLRe8GLVC/3rYRae1h+xfQzt09xOfb0PaHSk=", + "lastModified": 1743827369, + "narHash": "sha256-rpqepOZ8Eo1zg+KJeWoq1HAOgoMCDloqv5r2EAa9TSA=", "owner": "nixos", "repo": "nixpkgs", - "rev": "5e5402ecbcb27af32284d4a62553c019a3a49ea6", + "rev": "42a1c966be226125b48c384171c44c651c236c22", "type": "github" }, "original": { From aa7946ff6a06ea49debd9b63d9f0cbbb6ec9da77 Mon Sep 17 00:00:00 2001 From: ukubot Date: Mon, 14 Apr 2025 00:01:52 +0000 Subject: [PATCH 05/23] flake.lock: Update MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Flake lock file updates: • Updated input 'nixpkgs': 'github:nixos/nixpkgs/42a1c966be226125b48c384171c44c651c236c22?narHash=sha256-rpqepOZ8Eo1zg%2BKJeWoq1HAOgoMCDloqv5r2EAa9TSA%3D' (2025-04-05) → 'github:nixos/nixpkgs/2631b0b7abcea6e640ce31cd78ea58910d31e650?narHash=sha256-LWqduOgLHCFxiTNYi3Uj5Lgz0SR%2BXhw3kr/3Xd0GPTM%3D' (2025-04-12) --- flake.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index 0d680a2..019392c 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1743827369, - "narHash": "sha256-rpqepOZ8Eo1zg+KJeWoq1HAOgoMCDloqv5r2EAa9TSA=", + "lastModified": 1744463964, + "narHash": "sha256-LWqduOgLHCFxiTNYi3Uj5Lgz0SR+Xhw3kr/3Xd0GPTM=", "owner": "nixos", "repo": "nixpkgs", - "rev": "42a1c966be226125b48c384171c44c651c236c22", + "rev": "2631b0b7abcea6e640ce31cd78ea58910d31e650", "type": "github" }, "original": { From 0d78897154be46c7170f599be4e0b1a6fb78b604 Mon Sep 17 00:00:00 2001 From: uku Date: Mon, 14 Apr 2025 17:08:51 +0200 Subject: [PATCH 06/23] chore: remove reposilite module now in upstream! --- flake.nix | 1 - modules/reposilite.nix | 443 ----------------------------------------- 2 files changed, 444 deletions(-) delete mode 100644 modules/reposilite.nix diff --git a/flake.nix b/flake.nix index 2d7985a..24073eb 100644 --- a/flake.nix +++ b/flake.nix @@ -37,7 +37,6 @@ overlays.default = import ./pkgs/all-packages.nix; nixosModules = { - reposilite = import ./modules/reposilite.nix; asus-numpad = lib.modules.importApply ./modules/asus-numpad.nix { inherit self; }; shlink = lib.modules.importApply ./modules/shlink.nix { inherit self; }; }; diff --git a/modules/reposilite.nix b/modules/reposilite.nix deleted file mode 100644 index fab7389..0000000 --- a/modules/reposilite.nix +++ /dev/null @@ -1,443 +0,0 @@ -{ - lib, - config, - pkgs, - ... -}: -let - cfg = config.services.reposilite; - format = pkgs.formats.cdn { }; - configFile = format.generate "reposilite.cdn" cfg.settings; - - useEmbeddedDb = cfg.database.type == "sqlite" || cfg.database.type == "h2"; - useMySQL = cfg.database.type == "mariadb" || cfg.database.type == "mysql"; - usePostgres = cfg.database.type == "postgresql"; - - # db password is appended at runtime by the service script (if needed) - dbString = - if useEmbeddedDb then - "${cfg.database.type} ${cfg.database.path}" - else - "${cfg.database.type} ${cfg.database.host}:${builtins.toString cfg.database.port} ${cfg.database.dbname} ${cfg.database.user} $(<${cfg.database.passwordFile})"; - - certDir = config.security.acme.certs.${cfg.useACMEHost}.directory; - - databaseModule = { - options = { - type = lib.mkOption { - type = lib.types.enum [ - "h2" - "mariadb" - "mysql" - "postgresql" - "sqlite" - ]; - description = '' - Database engine to use. - ''; - default = "sqlite"; - }; - - path = lib.mkOption { - type = lib.types.str; - description = '' - Path to the embedded database file. Set to `--temporary` to use an in-memory database. - ''; - default = "reposilite.db"; - }; - - host = lib.mkOption { - type = lib.types.str; - description = '' - Database host address. - ''; - default = "127.0.0.1"; - }; - - port = lib.mkOption { - type = lib.types.port; - description = '' - Database TCP port. - ''; - defaultText = lib.literalExpression '' - if type == "postgresql" then 5432 else 3306 - ''; - default = if usePostgres then config.services.postgresql.settings.port else 3306; - }; - - dbname = lib.mkOption { - type = lib.types.str; - description = '' - Database name. - ''; - default = "reposilite"; - }; - - user = lib.mkOption { - type = lib.types.str; - description = '' - Database user. - ''; - default = "reposilite"; - }; - - passwordFile = lib.mkOption { - type = lib.types.nullOr lib.types.path; - description = '' - Path to the file containing the password for the database connection. - This file must be readable by {option}`services.reposilite.user`. - ''; - default = null; - }; - }; - }; - - settingsModule = { - freeformType = format.type; - options = { - hostname = lib.mkOption { - type = lib.types.str; - description = '' - The hostname to bind to. Set to `0.0.0.0` to accept connections from everywhere, or `127.0.0.1` to restrict to localhost." - ''; - default = "0.0.0.0"; - example = "127.0.0.1"; - }; - - port = lib.mkOption { - type = lib.types.port; - description = '' - The TCP port to bind to. - ''; - default = 3000; - }; - - database = lib.mkOption { - type = lib.types.nullOr lib.types.str; - description = '' - Database connection string. Please use {option}`services.reposilite.database` instead. - See https://reposilite.com/guide/general#local-configuration for valid values. - ''; - default = null; - }; - - sslEnabled = lib.mkOption { - type = lib.types.bool; - description = '' - Whether to listen for encrypted connections on {option}`settings.sslPort`. - ''; - default = false; - }; - - sslPort = lib.mkOption { - type = lib.types.port; # cant be null - description = "SSL port to bind to. SSL needs to be enabled explicitly via {option}`settings.enableSsl`."; - default = 443; - }; - - keyPath = lib.mkOption { - type = lib.types.nullOr lib.types.str; - description = '' - Path to the .jsk KeyStore or paths to the PKCS#8 certificate and private key, separated by a space (see example). - You can use `''${WORKING_DIRECTORY}` to refer to paths relative to Reposilite's working directory. - If you are using a Java KeyStore, don't forget to specify the password via the {var}`REPOSILITE_LOCAL_KEYPASSWORD` environment variable. - See https://reposilite.com/guide/ssl for more information on how to set SSL up. - ''; - default = null; - example = "\${WORKING_DIRECTORY}/cert.pem \${WORKING_DIRECTORY}/key.pem"; - }; - - keyPassword = lib.mkOption { - type = lib.types.nullOr lib.types.str; - description = '' - Plaintext password used to unlock the Java KeyStore set in {option}`services.reposilite.settings.keyPath`. - WARNING: this option is insecure and should not be used to store the password. - Consider using {option}`services.reposilite.keyPasswordFile` instead. - ''; - default = null; - }; - - enforceSsl = lib.mkOption { - type = lib.types.bool; - description = '' - Whether to redirect all traffic to SSL. - ''; - default = false; - }; - - webThreadPool = lib.mkOption { - type = lib.types.ints.between 5 65535; - description = '' - Maximum amount of threads used by the core thread pool. (min: 5) - The web thread pool handles the first few steps of incoming HTTP connections, tasks are redirected as soon as possible to the IO thread pool. - ''; - default = 16; - }; - - ioThreadPool = lib.mkOption { - type = lib.types.ints.between 2 65535; - description = '' - The IO thread pool handles all tasks that may benefit from non-blocking IO. (min: 2) - Because most tasks are redirected to IO thread pool, it might be a good idea to keep it at least equal to web thread pool. - ''; - default = 8; - }; - - databaseThreadPool = lib.mkOption { - type = lib.types.ints.positive; - description = '' - Maximum amount of concurrent connections to the database. (one per thread) - Embedded databases (sqlite, h2) do not support truly concurrent connections, so the value will always be `1` if they are used. - ''; - default = 1; - }; - - compressionStrategy = lib.mkOption { - type = lib.types.enum [ - "none" - "gzip" - ]; - description = '' - Compression algorithm used by this instance of Reposilite. - `none` reduces usage of CPU & memory, but requires transfering more data. - ''; - default = "none"; - }; - - idleTimeout = lib.mkOption { - type = lib.types.ints.unsigned; - description = '' - Default idle timeout used by Jetty. - ''; - default = 30000; - }; - - bypassExternalCache = lib.mkOption { - type = lib.types.bool; - description = '' - Add cache bypass headers to responses from /api/* to avoid issues with proxies such as Cloudflare. - ''; - default = true; - }; - - cachedLogSize = lib.mkOption { - type = lib.types.ints.unsigned; - description = '' - Amount of messages stored in the cache logger. - ''; - default = 50; - }; - - defaultFrontend = lib.mkOption { - type = lib.types.bool; - description = '' - Whether to enable the default included frontend with a dashboard. - ''; - default = true; - }; - - basePath = lib.mkOption { - type = lib.types.str; - description = '' - Custom base path for this Reposilite instance. - It is not recommended changing this, you should instead prioritize using a different subdomain. - ''; - default = "/"; - }; - - debugEnabled = lib.mkOption { - type = lib.types.bool; - description = '' - Whether to enable debug mode. - ''; - default = false; - }; - }; - }; -in -{ - options.services.reposilite = { - enable = lib.mkEnableOption "Reposilite"; - package = lib.mkPackageOption pkgs "reposilite" { } // { - apply = - pkg: - pkg.override (old: { - plugins = (old.plugins or [ ]) ++ cfg.plugins; - }); - }; - - plugins = lib.mkOption { - type = lib.types.listOf lib.types.package; - description = '' - List of plugins to add to Reposilite. - ''; - default = [ ]; - example = "with reposilitePlugins; [ checksum groovy ]"; - }; - - database = lib.mkOption { - description = "Database options."; - default = { }; - type = lib.types.submodule databaseModule; - }; - - keyPasswordFile = lib.mkOption { - type = lib.types.nullOr lib.types.path; - description = '' - Path the the file containing the password used to unlock the Java KeyStore file specified in {option}`services.reposilite.settings.keyPath`. - This file must be readable my {option}`services.reposilite.user`. - ''; - default = null; - }; - - useACMEHost = lib.mkOption { - type = lib.types.nullOr lib.types.str; - description = '' - Host of an existing Let's Encrypt certificate to use for SSL. - Make sure that the certificate directory is readable by the `reposilite` user or group, for example via {option}`security.acme.certs..group`. - *Note that this option does not create any certificates, nor it does add subdomains to existing ones – you will need to create them manually using {option}`security.acme.certs`* - ''; - default = null; - }; - - settings = lib.mkOption { - description = "Configuration written to the reposilite.cdn file"; - default = { }; - type = lib.types.submodule settingsModule; - }; - - workingDirectory = lib.mkOption { - type = lib.types.path; - description = '' - Working directory for Reposilite. - ''; - default = "/var/lib/reposilite"; - }; - - extraArgs = lib.mkOption { - type = lib.types.listOf lib.types.str; - description = '' - Extra arguments/parameters passed to the Reposilite. Can be used for first token generation. - ''; - default = [ ]; - example = lib.literalExpression ''[ "--token" "name:tempsecrettoken" ]''; - }; - - user = lib.mkOption { - type = lib.types.str; - description = '' - The user to run Reposilite under. - ''; - default = "reposilite"; - }; - - group = lib.mkOption { - type = lib.types.str; - description = '' - The group to run Reposilite under. - ''; - default = "reposilite"; - }; - - openFirewall = lib.mkOption { - type = lib.types.bool; - description = '' - Whether to open the firewall ports for Reposilite. If SSL is enabled, its port will be opened too. - ''; - default = false; - }; - }; - - config = lib.mkIf cfg.enable { - assertions = [ - { - assertion = cfg.settings.sslEnabled -> cfg.settings.keyPath != null; - message = '' - Reposilite was configured to enable SSL, but no valid paths to certificate files were provided via `settings.keyPath`. - Read more about SSL certificates here: https://reposilite.com/guide/ssl - ''; - } - { - assertion = cfg.settings.enforceSsl -> cfg.settings.sslEnabled; - message = "You cannot enforce SSL if SSL is not enabled."; - } - { - assertion = !useEmbeddedDb -> cfg.database.passwordFile != null; - message = "You need to set `services.reposilite.database.passwordFile` when using MySQL or Postgres."; - } - ]; - - services.reposilite.settings.keyPath = lib.mkIf ( - cfg.useACMEHost != null - ) "${certDir}/fullchain.pem ${certDir}/key.pem"; - - environment.systemPackages = [ cfg.package ]; - - users = lib.mkMerge [ - (lib.mkIf (cfg.user == "reposilite") { - groups.${cfg.group} = { }; - }) - (lib.mkIf (cfg.user == "reposilite") { - users.${cfg.user} = { - isSystemUser = true; - group = cfg.group; - }; - }) - ]; - - networking.firewall = lib.mkIf cfg.openFirewall ( - lib.mkMerge [ - { - allowedTCPPorts = [ cfg.settings.port ]; - } - (lib.mkIf cfg.settings.sslEnabled { - allowedTCPPorts = [ cfg.settings.sslPort ]; - }) - ] - ); - - systemd.services.reposilite = { - enable = true; - wantedBy = [ "multi-user.target" ]; - after = - [ "network.target" ] - ++ (lib.optional useMySQL "mysql.service") - ++ (lib.optional usePostgres "postgresql.service"); - - script = - lib.optionalString (cfg.keyPasswordFile != null && cfg.settings.keyPassword == null) '' - export REPOSILITE_LOCAL_KEYPASSWORD="$(<${cfg.keyPasswordFile})" - '' - + '' - export REPOSILITE_LOCAL_DATABASE="${dbString}" - - ${lib.getExe cfg.package} --local-configuration ${configFile} --local-configuration-mode none --working-directory ${cfg.workingDirectory} ${lib.escapeShellArgs cfg.extraArgs} - ''; - - serviceConfig = lib.mkMerge [ - (lib.mkIf (builtins.dirOf cfg.workingDirectory == "/var/lib") { - StateDirectory = builtins.baseNameOf cfg.workingDirectory; - StateDirectoryMode = "700"; - }) - { - Type = "exec"; - Restart = "on-failure"; - - User = cfg.user; - Group = cfg.group; - WorkingDirectory = cfg.workingDirectory; - - # TODO better hardening - LimitNOFILE = "1048576"; - PrivateTmp = true; - PrivateDevices = true; - ProtectHome = true; - ProtectSystem = "strict"; - AmbientCapabilities = "CAP_NET_BIND_SERVICE"; - } - ]; - }; - }; - - meta.maintainers = [ lib.maintainers.uku3lig ]; -} From 05251ef10cc388f39a84c1fac39e99f8a28c3090 Mon Sep 17 00:00:00 2001 From: ukubot Date: Mon, 21 Apr 2025 00:01:23 +0000 Subject: [PATCH 07/23] flake.lock: Update MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Flake lock file updates: • Updated input 'nixpkgs': 'github:nixos/nixpkgs/2631b0b7abcea6e640ce31cd78ea58910d31e650?narHash=sha256-LWqduOgLHCFxiTNYi3Uj5Lgz0SR%2BXhw3kr/3Xd0GPTM%3D' (2025-04-12) → 'github:nixos/nixpkgs/b024ced1aac25639f8ca8fdfc2f8c4fbd66c48ef?narHash=sha256-fusHbZCyv126cyArUwwKrLdCkgVAIaa/fQJYFlCEqiU%3D' (2025-04-17) --- flake.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index 019392c..9dfc977 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1744463964, - "narHash": "sha256-LWqduOgLHCFxiTNYi3Uj5Lgz0SR+Xhw3kr/3Xd0GPTM=", + "lastModified": 1744932701, + "narHash": "sha256-fusHbZCyv126cyArUwwKrLdCkgVAIaa/fQJYFlCEqiU=", "owner": "nixos", "repo": "nixpkgs", - "rev": "2631b0b7abcea6e640ce31cd78ea58910d31e650", + "rev": "b024ced1aac25639f8ca8fdfc2f8c4fbd66c48ef", "type": "github" }, "original": { From 39cadae73143fac451277fc84d0e9d01041b9336 Mon Sep 17 00:00:00 2001 From: ukubot Date: Mon, 28 Apr 2025 00:01:29 +0000 Subject: [PATCH 08/23] flake.lock: Update MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Flake lock file updates: • Updated input 'nixpkgs': 'github:nixos/nixpkgs/b024ced1aac25639f8ca8fdfc2f8c4fbd66c48ef?narHash=sha256-fusHbZCyv126cyArUwwKrLdCkgVAIaa/fQJYFlCEqiU%3D' (2025-04-17) → 'github:nixos/nixpkgs/f771eb401a46846c1aebd20552521b233dd7e18b?narHash=sha256-ITSpPDwvLBZBnPRS2bUcHY3gZSwis/uTe255QgMtTLA%3D' (2025-04-24) --- flake.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index 9dfc977..d3d7327 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1744932701, - "narHash": "sha256-fusHbZCyv126cyArUwwKrLdCkgVAIaa/fQJYFlCEqiU=", + "lastModified": 1745526057, + "narHash": "sha256-ITSpPDwvLBZBnPRS2bUcHY3gZSwis/uTe255QgMtTLA=", "owner": "nixos", "repo": "nixpkgs", - "rev": "b024ced1aac25639f8ca8fdfc2f8c4fbd66c48ef", + "rev": "f771eb401a46846c1aebd20552521b233dd7e18b", "type": "github" }, "original": { From 4c8368c6eeea9389f635a57cef51f61fad52f1b8 Mon Sep 17 00:00:00 2001 From: ukubot Date: Mon, 5 May 2025 00:01:46 +0000 Subject: [PATCH 09/23] flake.lock: Update MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Flake lock file updates: • Updated input 'nixpkgs': 'github:nixos/nixpkgs/f771eb401a46846c1aebd20552521b233dd7e18b?narHash=sha256-ITSpPDwvLBZBnPRS2bUcHY3gZSwis/uTe255QgMtTLA%3D' (2025-04-24) → 'github:nixos/nixpkgs/979daf34c8cacebcd917d540070b52a3c2b9b16e?narHash=sha256-uKCfuDs7ZM3QpCE/jnfubTg459CnKnJG/LwqEVEdEiw%3D' (2025-05-04) --- flake.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index d3d7327..f4e2e7a 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1745526057, - "narHash": "sha256-ITSpPDwvLBZBnPRS2bUcHY3gZSwis/uTe255QgMtTLA=", + "lastModified": 1746328495, + "narHash": "sha256-uKCfuDs7ZM3QpCE/jnfubTg459CnKnJG/LwqEVEdEiw=", "owner": "nixos", "repo": "nixpkgs", - "rev": "f771eb401a46846c1aebd20552521b233dd7e18b", + "rev": "979daf34c8cacebcd917d540070b52a3c2b9b16e", "type": "github" }, "original": { From be63ca798e6e20b1d4a4f63e0e36414e8abad500 Mon Sep 17 00:00:00 2001 From: uku Date: Mon, 5 May 2025 11:32:23 +0200 Subject: [PATCH 10/23] vineflower: 1.11.0 -> 1.11.1 --- pkgs/vineflower.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/vineflower.nix b/pkgs/vineflower.nix index dfa1f1c..62ad53a 100644 --- a/pkgs/vineflower.nix +++ b/pkgs/vineflower.nix @@ -6,11 +6,11 @@ }: stdenv.mkDerivation (finalAttrs: { pname = "vineflower"; - version = "1.11.0"; + version = "1.11.1"; src = fetchurl { url = "https://github.com/Vineflower/vineflower/releases/download/${finalAttrs.version}/vineflower-${finalAttrs.version}.jar"; - hash = "sha256-/bYp9DFRIh4FrVM32TwyLka8J1FiNElCrpKnzqb4ESk="; + hash = "sha256-phXQfdu81Ik2lnT0DkLfY5wyvpVBCJCzjxc9XB4uo5w="; }; nativeBuildInputs = [ makeWrapper ]; From f237d37b66b5f764a15b471b5209df650f22fd57 Mon Sep 17 00:00:00 2001 From: uku Date: Mon, 5 May 2025 14:21:08 +0200 Subject: [PATCH 11/23] shlink: set shlink version in the files --- pkgs/shlink/package.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/shlink/package.nix b/pkgs/shlink/package.nix index 7cd04e6..f7de262 100644 --- a/pkgs/shlink/package.nix +++ b/pkgs/shlink/package.nix @@ -36,6 +36,10 @@ php84.buildComposerProject (finalAttrs: { composerLock = ./composer.lock; vendorHash = "sha256-M+3eGiezHsr8H5TyUXhYLsVK316iZzcFVSo9Jwc5W/o="; + postPatch = '' + sed -i "s/%SHLINK_VERSION%/${finalAttrs.version}/g" module/Core/src/Config/Options/AppOptions.php + ''; + postInstall = '' mkdir -p $out/bin ln -s $out/share/php/shlink/bin/cli $out/bin/shlink From 3bb4be1376ef252d4302ff073e3bfd258c6c19a3 Mon Sep 17 00:00:00 2001 From: ukubot Date: Mon, 12 May 2025 00:01:25 +0000 Subject: [PATCH 12/23] flake.lock: Update MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Flake lock file updates: • Updated input 'nixpkgs': 'github:nixos/nixpkgs/979daf34c8cacebcd917d540070b52a3c2b9b16e?narHash=sha256-uKCfuDs7ZM3QpCE/jnfubTg459CnKnJG/LwqEVEdEiw%3D' (2025-05-04) → 'github:nixos/nixpkgs/d89fc19e405cb2d55ce7cc114356846a0ee5e956?narHash=sha256-3e%2BAVBczosP5dCLQmMoMEogM57gmZ2qrVSrmq9aResQ%3D' (2025-05-10) --- flake.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index f4e2e7a..7dcb42b 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1746328495, - "narHash": "sha256-uKCfuDs7ZM3QpCE/jnfubTg459CnKnJG/LwqEVEdEiw=", + "lastModified": 1746904237, + "narHash": "sha256-3e+AVBczosP5dCLQmMoMEogM57gmZ2qrVSrmq9aResQ=", "owner": "nixos", "repo": "nixpkgs", - "rev": "979daf34c8cacebcd917d540070b52a3c2b9b16e", + "rev": "d89fc19e405cb2d55ce7cc114356846a0ee5e956", "type": "github" }, "original": { From 38f08843182da8b78a6f8513eba550625426c44b Mon Sep 17 00:00:00 2001 From: ukubot Date: Mon, 19 May 2025 00:01:34 +0000 Subject: [PATCH 13/23] flake.lock: Update MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Flake lock file updates: • Updated input 'nixpkgs': 'github:nixos/nixpkgs/d89fc19e405cb2d55ce7cc114356846a0ee5e956?narHash=sha256-3e%2BAVBczosP5dCLQmMoMEogM57gmZ2qrVSrmq9aResQ%3D' (2025-05-10) → 'github:nixos/nixpkgs/292fa7d4f6519c074f0a50394dbbe69859bb6043?narHash=sha256-GaOZntlJ6gPPbbkTLjbd8BMWaDYafhuuYRNrxCGnPJw%3D' (2025-05-18) --- flake.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index 7dcb42b..4eae39b 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1746904237, - "narHash": "sha256-3e+AVBczosP5dCLQmMoMEogM57gmZ2qrVSrmq9aResQ=", + "lastModified": 1747542820, + "narHash": "sha256-GaOZntlJ6gPPbbkTLjbd8BMWaDYafhuuYRNrxCGnPJw=", "owner": "nixos", "repo": "nixpkgs", - "rev": "d89fc19e405cb2d55ce7cc114356846a0ee5e956", + "rev": "292fa7d4f6519c074f0a50394dbbe69859bb6043", "type": "github" }, "original": { From 093a74f77b4173c77dcecb3ee75a465e1e376ea5 Mon Sep 17 00:00:00 2001 From: ukubot Date: Mon, 26 May 2025 00:01:44 +0000 Subject: [PATCH 14/23] flake.lock: Update MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Flake lock file updates: • Updated input 'nixpkgs': 'github:nixos/nixpkgs/292fa7d4f6519c074f0a50394dbbe69859bb6043?narHash=sha256-GaOZntlJ6gPPbbkTLjbd8BMWaDYafhuuYRNrxCGnPJw%3D' (2025-05-18) → 'github:nixos/nixpkgs/063f43f2dbdef86376cc29ad646c45c46e93234c?narHash=sha256-6m1Y3/4pVw1RWTsrkAK2VMYSzG4MMIj7sqUy7o8th1o%3D' (2025-05-23) --- flake.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index 4eae39b..ca9a671 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1747542820, - "narHash": "sha256-GaOZntlJ6gPPbbkTLjbd8BMWaDYafhuuYRNrxCGnPJw=", + "lastModified": 1748026106, + "narHash": "sha256-6m1Y3/4pVw1RWTsrkAK2VMYSzG4MMIj7sqUy7o8th1o=", "owner": "nixos", "repo": "nixpkgs", - "rev": "292fa7d4f6519c074f0a50394dbbe69859bb6043", + "rev": "063f43f2dbdef86376cc29ad646c45c46e93234c", "type": "github" }, "original": { From be626bff9023bf40460c2a37acbd0b3569e8c042 Mon Sep 17 00:00:00 2001 From: ukubot Date: Mon, 2 Jun 2025 00:00:58 +0000 Subject: [PATCH 15/23] flake.lock: Update MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Flake lock file updates: • Updated input 'nixpkgs': 'github:nixos/nixpkgs/063f43f2dbdef86376cc29ad646c45c46e93234c?narHash=sha256-6m1Y3/4pVw1RWTsrkAK2VMYSzG4MMIj7sqUy7o8th1o%3D' (2025-05-23) → 'github:nixos/nixpkgs/910796cabe436259a29a72e8d3f5e180fc6dfacc?narHash=sha256-StSrWhklmDuXT93yc3GrTlb0cKSS0agTAxMGjLKAsY8%3D' (2025-05-31) --- flake.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index ca9a671..c3bcd25 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1748026106, - "narHash": "sha256-6m1Y3/4pVw1RWTsrkAK2VMYSzG4MMIj7sqUy7o8th1o=", + "lastModified": 1748693115, + "narHash": "sha256-StSrWhklmDuXT93yc3GrTlb0cKSS0agTAxMGjLKAsY8=", "owner": "nixos", "repo": "nixpkgs", - "rev": "063f43f2dbdef86376cc29ad646c45c46e93234c", + "rev": "910796cabe436259a29a72e8d3f5e180fc6dfacc", "type": "github" }, "original": { From d88268d9408db810024bdc2fd55a1e7542334515 Mon Sep 17 00:00:00 2001 From: uku Date: Mon, 2 Jun 2025 10:31:19 +0200 Subject: [PATCH 16/23] fix: import nixpkgs reproducibly https://nix.dev/guides/best-practices#reproducible-nixpkgs-configuration --- default.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/default.nix b/default.nix index 13d97a8..44b9600 100644 --- a/default.nix +++ b/default.nix @@ -1,4 +1,7 @@ -{ - pkgs ? import { }, -}: +let + pkgs = import { + config = { }; + overlays = [ ]; + }; +in import ./pkgs/all-packages.nix { } pkgs From b730a1516e0dc04c9c147121184917cd98b8ab44 Mon Sep 17 00:00:00 2001 From: uku Date: Mon, 2 Jun 2025 11:13:01 +0200 Subject: [PATCH 17/23] liberica-17: init at 17.0.15+10 --- pkgs/all-packages.nix | 1 + pkgs/liberica.nix | 95 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 96 insertions(+) create mode 100644 pkgs/liberica.nix diff --git a/pkgs/all-packages.nix b/pkgs/all-packages.nix index 9863104..c2b1e92 100644 --- a/pkgs/all-packages.nix +++ b/pkgs/all-packages.nix @@ -2,6 +2,7 @@ final: prev: { asus-numpad = prev.callPackage ./asus-numpad.nix { }; enigma = prev.callPackage ./enigma.nix { }; jaspersoft-studio-community = prev.callPackage ./jaspersoft-studio-community.nix { }; + liberica-17 = prev.callPackage ./liberica.nix { }; openwebstart = prev.callPackage ./openwebstart.nix { }; shlink = prev.callPackage ./shlink/package.nix { }; sql-developer = prev.callPackage ./sql-developer.nix { }; diff --git a/pkgs/liberica.nix b/pkgs/liberica.nix new file mode 100644 index 0000000..110683e --- /dev/null +++ b/pkgs/liberica.nix @@ -0,0 +1,95 @@ +{ + lib, + stdenv, + alsa-lib, + autoPatchelfHook, + fetchurl, + xorg, + zlib, + gtk3, + cairo, + glib, + cups, + makeWrapper, + setJavaClassPath, + freetype, +}: +let + runtimeLibs = [ + cups + gtk3 + glib + cairo + ]; +in +stdenv.mkDerivation (finalAttrs: { + pname = "liberica-jdk-bin"; + version = "17.0.15+10"; + + src = fetchurl { + url = "https://download.bell-sw.com/java/${finalAttrs.version}/bellsoft-jdk${finalAttrs.version}-linux-amd64.tar.gz"; + hash = "sha256-dKKSwrMmQ15v7k354JeQi/IuLFPQ20BUB41YYPFOUzQ="; + }; + + nativeBuildInputs = [ + autoPatchelfHook + makeWrapper + ]; + + buildInputs = [ + alsa-lib + freetype + xorg.libX11 + xorg.libXext + xorg.libXi + xorg.libXrender + xorg.libXtst + zlib + ]; + + installPhase = '' + runHook preInstall + + cd .. + mv $sourceRoot $out + + # jni.h expects jni_md.h to be in the header search path. + ln -s $out/include/linux/*_md.h $out/include/ + + # Remove some broken manpages. + # Only for 11 and earlier. + [ -e "$out/man/ja" ] && rm -r $out/man/ja* + + # Remove embedded freetype to avoid problems like + # https://github.com/NixOS/nixpkgs/issues/57733 + find "$out" -name 'libfreetype.so*' -delete + + # Propagate the setJavaClassPath setup hook from the JDK so that + # any package that depends on the JDK has $CLASSPATH set up + # properly. + mkdir -p $out/nix-support + printWords ${setJavaClassPath} > $out/nix-support/propagated-build-inputs + + # Set JAVA_HOME automatically. + cat <> "$out/nix-support/setup-hook" + if [ -z "\''${JAVA_HOME-}" ]; then export JAVA_HOME=$out; fi + EOF + + # We cannot use -exec since wrapProgram is a function but not a command. + # + # jspawnhelper is executed from JVM, so it doesn't need to wrap it, and it + # breaks building OpenJDK (#114495). + for bin in $( find "$out" -executable -type f -not -name jspawnhelper ); do + if patchelf --print-interpreter "$bin" &> /dev/null; then + wrapProgram "$bin" --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath runtimeLibs}" + fi + done + + runHook postInstall + ''; + + meta = { + mainProgram = "java"; + platforms = lib.platforms.linux; + }; +}) From 63a165b80177d11ec14b8d4314091db36db162f8 Mon Sep 17 00:00:00 2001 From: uku Date: Thu, 5 Jun 2025 12:02:01 +0200 Subject: [PATCH 18/23] project-sekai-cursors: init --- pkgs/all-packages.nix | 1 + pkgs/project-sekai-cursors/fetch-hashes.sh | 26 ++++++++ pkgs/project-sekai-cursors/hashes.json | 14 ++++ pkgs/project-sekai-cursors/package.nix | 76 ++++++++++++++++++++++ 4 files changed, 117 insertions(+) create mode 100755 pkgs/project-sekai-cursors/fetch-hashes.sh create mode 100644 pkgs/project-sekai-cursors/hashes.json create mode 100644 pkgs/project-sekai-cursors/package.nix diff --git a/pkgs/all-packages.nix b/pkgs/all-packages.nix index c2b1e92..59a3ba0 100644 --- a/pkgs/all-packages.nix +++ b/pkgs/all-packages.nix @@ -4,6 +4,7 @@ final: prev: { jaspersoft-studio-community = prev.callPackage ./jaspersoft-studio-community.nix { }; liberica-17 = prev.callPackage ./liberica.nix { }; openwebstart = prev.callPackage ./openwebstart.nix { }; + project-sekai-cursors = prev.callPackage ./project-sekai-cursors/package.nix { }; shlink = prev.callPackage ./shlink/package.nix { }; sql-developer = prev.callPackage ./sql-developer.nix { }; vineflower = prev.callPackage ./vineflower.nix { }; diff --git a/pkgs/project-sekai-cursors/fetch-hashes.sh b/pkgs/project-sekai-cursors/fetch-hashes.sh new file mode 100755 index 0000000..6e24768 --- /dev/null +++ b/pkgs/project-sekai-cursors/fetch-hashes.sh @@ -0,0 +1,26 @@ +#!/usr/bin/env nix-shell +#!nix-shell -i bash -p curl jq + +# shellcheck shell=bash + +set -euo pipefail + +groups=("VirtualSinger" "leoneed" "MMJ" "VBS" "WxS" "N25") + +for group in "${groups[@]}"; do + tmpfile=$(mktemp) + curl -o "$tmpfile" "https://www.colorfulstage.com/upload_images/media/Download/ani%20file-animation-${group}.zip" + hash=$(nix-hash --sri --flat --type sha256 "$tmpfile") + + updatedContent=$(jq ".\"$group-ani\" = \"$hash\"" ./hashes.json) + echo -E "$updatedContent" > ./hashes.json +done + +for group in "${groups[@]}"; do + tmpfile=$(mktemp) + curl -o "$tmpfile" "https://www.colorfulstage.com/upload_images/media/Download/cur%20file-static-${group}.zip" + hash=$(nix-hash --sri --flat --type sha256 "$tmpfile") + + updatedContent=$(jq ".\"$group-cur\" = \"$hash\"" ./hashes.json) + echo -E "$updatedContent" > ./hashes.json +done diff --git a/pkgs/project-sekai-cursors/hashes.json b/pkgs/project-sekai-cursors/hashes.json new file mode 100644 index 0000000..ac2c9a4 --- /dev/null +++ b/pkgs/project-sekai-cursors/hashes.json @@ -0,0 +1,14 @@ +{ + "VirtualSinger-ani": "sha256-YUWi9VFoU3UkLMJjC5SB3jzkmXrcoLttj3w/D35Vrco=", + "leoneed-ani": "sha256-5HlCdQ5SZ2TCeMjD33FmkhZN+BJOT1Y/eHBvsgsAblk=", + "MMJ-ani": "sha256-AYOkEGiScmVtO+NOpe4xtbyn4408iRVXN6Bhdh/pNig=", + "VBS-ani": "sha256-oh2rj0oIPBXMWdi7gHNhqlb7VatQiVOfIjt32juAE5o=", + "WxS-ani": "sha256-r7+UW0m72QVDIShDsUhrzfVwHy82q3KfHGTcBl9nooE=", + "N25-ani": "sha256-clGFuHrFMUV5Va/btiKctQBXVx5c6MGCkAs6Iw3G0Ig=", + "VirtualSinger-cur": "sha256-s9+CVTaj+z2UKgbEq0+3z3ql+30S1Q2w2iGFR/FZRxE=", + "leoneed-cur": "sha256-o/d8le0+4TnKvyPj3SgETQCZ30fhppgqvsr/uHa5dho=", + "MMJ-cur": "sha256-fsLPVuKDqxJjpZl27Ih3+6ybj8aEzVvIZpW4Wmu34v4=", + "VBS-cur": "sha256-+Me8JuSK/4bA37l0Gin2s+0A2xe7PKQ1LR8y5SmI1Sc=", + "WxS-cur": "sha256-eNJtX/dwOuVdXVeGOjDHxLWQ/UdCMcwuZE4DO2d9sbI=", + "N25-cur": "sha256-PJxBWW8klKDE/G77hIHJRSyy5p6W/ICmFMobaw3c3Ww=" +} diff --git a/pkgs/project-sekai-cursors/package.nix b/pkgs/project-sekai-cursors/package.nix new file mode 100644 index 0000000..d4ab141 --- /dev/null +++ b/pkgs/project-sekai-cursors/package.nix @@ -0,0 +1,76 @@ +{ + lib, + stdenvNoCC, + fetchurl, + unzip, + win2xcur, + # options + group ? "", + animated ? false, + # can be specified if the provided hashes do not suffice + hash ? null, +}: +let + format = if animated then "ani" else "cur"; + suffix = if animated then "animation" else "static"; + + hashes = lib.importJSON ./hashes.json; + + addmissing = fetchurl { + url = "https://gist.githubusercontent.com/uku3lig/1a761983e4ae467009a682bea505a513/raw/80ff57a2f4866ede5984e34c48dba1413d1ad353/addmissing.sh"; + hash = "sha256-UTe3LKcmES6G1XHVvCN9Mvs3fVqaj0+bsv+0E33PmYk="; + }; +in +stdenvNoCC.mkDerivation { + pname = "project-sekai-cursors-${group}-${suffix}"; + version = "0"; + + src = fetchurl { + url = "https://www.colorfulstage.com/upload_images/media/Download/${format}%20file-${suffix}-${group}.zip"; + hash = hashes."${group}-${format}" or hash; + }; + + nativeBuildInputs = [ + unzip + win2xcur + ]; + + unpackCmd = "unzip $src -d source"; + sourceRoot = "source"; + + buildPhase = '' + mkdir output/ + win2xcur *.{ani,cur} -o output + + pushd output + mv Busy wait + mv Diagonal1 size_fdiag + mv Diagonal2 size_bdiag + mv Help help + mv Horizontal ew-resize + mv Link pointer + mv Move move + mv Normal default + mv Precision cross + mv Text text + mv Unavailable not-allowed + mv Vertical ns-resize + mv Working half-busy + + bash ${addmissing} + popd + ''; + + installPhase = '' + mkdir -p "$out/share/icons/${group} Miku/cursors" + cp output/{*,.*} "$out/share/icons/${group} Miku/cursors" + + echo -e "[Icon Theme]\nName=${group} Miku" > "$out/share/icons/${group} Miku/index.theme" + echo -e "[Icon Theme]\nInherits=${group} Miku" > "$out/share/icons/${group} Miku/cursor.theme" + ''; + + meta = { + platforms = lib.platforms.all; + hydraPlatforms = [ ]; + }; +} From 4761b6fd19d52ecfff5bf4361303a08c092ffe55 Mon Sep 17 00:00:00 2001 From: uku Date: Thu, 5 Jun 2025 12:18:33 +0200 Subject: [PATCH 19/23] touhou-cursors: init --- pkgs/all-packages.nix | 1 + pkgs/touhou-cursors.nix | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 pkgs/touhou-cursors.nix diff --git a/pkgs/all-packages.nix b/pkgs/all-packages.nix index 59a3ba0..4e3cbc0 100644 --- a/pkgs/all-packages.nix +++ b/pkgs/all-packages.nix @@ -7,5 +7,6 @@ final: prev: { project-sekai-cursors = prev.callPackage ./project-sekai-cursors/package.nix { }; shlink = prev.callPackage ./shlink/package.nix { }; sql-developer = prev.callPackage ./sql-developer.nix { }; + touhou-cursors = prev.callPackage ./touhou-cursors.nix { }; vineflower = prev.callPackage ./vineflower.nix { }; } diff --git a/pkgs/touhou-cursors.nix b/pkgs/touhou-cursors.nix new file mode 100644 index 0000000..7718c51 --- /dev/null +++ b/pkgs/touhou-cursors.nix @@ -0,0 +1,36 @@ +{ + lib, + stdenvNoCC, + fetchFromGitHub, + character ? "", +}: +stdenvNoCC.mkDerivation { + pname = "touhou-cursors-${character}"; + version = "0"; + + src = fetchFromGitHub { + owner = "mabequinho"; + repo = "touhou-cursors"; + rev = "92a5513c5d247fb1813e27ac2986e85def510204"; + hash = "sha256-XYmEpRkvZK7O9F7s3nKFA9rd7xO0ECEWlVyUb8/whq4="; + }; + + installPhase = + if character == "" then + '' + rm README.md + echo "No character provided, please override the package with one of the available characters (eg. 'touhou-cursors.override { character = \"Patchouli\";}')" + echo * + exit 1 + '' + else + '' + mkdir -p $out/share/icons + cp -r ${character} $out/share/icons + ''; + + meta = { + platforms = lib.platforms.all; + hydraPlatforms = [ ]; + }; +} From 030e87ac3471824b523fe5272f0786f2119c632a Mon Sep 17 00:00:00 2001 From: ukubot Date: Mon, 9 Jun 2025 00:00:55 +0000 Subject: [PATCH 20/23] flake.lock: Update MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Flake lock file updates: • Updated input 'nixpkgs': 'github:nixos/nixpkgs/910796cabe436259a29a72e8d3f5e180fc6dfacc?narHash=sha256-StSrWhklmDuXT93yc3GrTlb0cKSS0agTAxMGjLKAsY8%3D' (2025-05-31) → 'github:nixos/nixpkgs/3e3afe5174c561dee0df6f2c2b2236990146329f?narHash=sha256-frdhQvPbmDYaScPFiCnfdh3B/Vh81Uuoo0w5TkWmmjU%3D' (2025-06-07) --- flake.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index c3bcd25..a67fb22 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1748693115, - "narHash": "sha256-StSrWhklmDuXT93yc3GrTlb0cKSS0agTAxMGjLKAsY8=", + "lastModified": 1749285348, + "narHash": "sha256-frdhQvPbmDYaScPFiCnfdh3B/Vh81Uuoo0w5TkWmmjU=", "owner": "nixos", "repo": "nixpkgs", - "rev": "910796cabe436259a29a72e8d3f5e180fc6dfacc", + "rev": "3e3afe5174c561dee0df6f2c2b2236990146329f", "type": "github" }, "original": { From e11596663ecc4cd67767d2dbb47c395465207600 Mon Sep 17 00:00:00 2001 From: ukubot Date: Mon, 16 Jun 2025 00:00:56 +0000 Subject: [PATCH 21/23] flake.lock: Update MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Flake lock file updates: • Updated input 'nixpkgs': 'github:nixos/nixpkgs/3e3afe5174c561dee0df6f2c2b2236990146329f?narHash=sha256-frdhQvPbmDYaScPFiCnfdh3B/Vh81Uuoo0w5TkWmmjU%3D' (2025-06-07) → 'github:nixos/nixpkgs/ee930f9755f58096ac6e8ca94a1887e0534e2d81?narHash=sha256-Kh9K4taXbVuaLC0IL%2B9HcfvxsSUx8dPB5s5weJcc9pc%3D' (2025-06-13) --- flake.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index a67fb22..1e5b514 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1749285348, - "narHash": "sha256-frdhQvPbmDYaScPFiCnfdh3B/Vh81Uuoo0w5TkWmmjU=", + "lastModified": 1749794982, + "narHash": "sha256-Kh9K4taXbVuaLC0IL+9HcfvxsSUx8dPB5s5weJcc9pc=", "owner": "nixos", "repo": "nixpkgs", - "rev": "3e3afe5174c561dee0df6f2c2b2236990146329f", + "rev": "ee930f9755f58096ac6e8ca94a1887e0534e2d81", "type": "github" }, "original": { From 5a666254fc02daf5279e2b6105f41a025bd74fa0 Mon Sep 17 00:00:00 2001 From: ukubot Date: Mon, 23 Jun 2025 00:01:38 +0000 Subject: [PATCH 22/23] flake.lock: Update MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Flake lock file updates: • Updated input 'nixpkgs': 'github:nixos/nixpkgs/ee930f9755f58096ac6e8ca94a1887e0534e2d81?narHash=sha256-Kh9K4taXbVuaLC0IL%2B9HcfvxsSUx8dPB5s5weJcc9pc%3D' (2025-06-13) → 'github:nixos/nixpkgs/4206c4cb56751df534751b058295ea61357bbbaa?narHash=sha256-VLFNc4egNjovYVxDGyBYTrvVCgDYgENp5bVi9fPTDYc%3D' (2025-06-21) --- flake.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index 1e5b514..925dac2 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1749794982, - "narHash": "sha256-Kh9K4taXbVuaLC0IL+9HcfvxsSUx8dPB5s5weJcc9pc=", + "lastModified": 1750506804, + "narHash": "sha256-VLFNc4egNjovYVxDGyBYTrvVCgDYgENp5bVi9fPTDYc=", "owner": "nixos", "repo": "nixpkgs", - "rev": "ee930f9755f58096ac6e8ca94a1887e0534e2d81", + "rev": "4206c4cb56751df534751b058295ea61357bbbaa", "type": "github" }, "original": { From 332ec9ae8ac24dffe6e1523942f4394f8cbca3f8 Mon Sep 17 00:00:00 2001 From: ukubot Date: Mon, 30 Jun 2025 00:02:15 +0000 Subject: [PATCH 23/23] flake.lock: Update MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Flake lock file updates: • Updated input 'nixpkgs': 'github:nixos/nixpkgs/4206c4cb56751df534751b058295ea61357bbbaa?narHash=sha256-VLFNc4egNjovYVxDGyBYTrvVCgDYgENp5bVi9fPTDYc%3D' (2025-06-21) → 'github:nixos/nixpkgs/30e2e2857ba47844aa71991daa6ed1fc678bcbb7?narHash=sha256-krGXKxvkBhnrSC/kGBmg5MyupUUT5R6IBCLEzx9jhMM%3D' (2025-06-27) --- flake.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index 925dac2..24c48b0 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1750506804, - "narHash": "sha256-VLFNc4egNjovYVxDGyBYTrvVCgDYgENp5bVi9fPTDYc=", + "lastModified": 1751011381, + "narHash": "sha256-krGXKxvkBhnrSC/kGBmg5MyupUUT5R6IBCLEzx9jhMM=", "owner": "nixos", "repo": "nixpkgs", - "rev": "4206c4cb56751df534751b058295ea61357bbbaa", + "rev": "30e2e2857ba47844aa71991daa6ed1fc678bcbb7", "type": "github" }, "original": {