From 9c989f2fd9471ec27c5b420fce6b8f2769fb70a6 Mon Sep 17 00:00:00 2001 From: sternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org> Date: Fri, 19 Mar 2021 22:43:34 +0100 Subject: [PATCH] spacecookie: add top-level attribute for haskellPackages.spacecookie The haskellPackages.spacecookie derivation also includes a library and thus a lot of propagated haskell dependencies. The top-level attribute uses haskell.lib.justStaticExecutables and therefore only the executable. This should reduce the runtime closure users have to download considerably if they only want the server. --- nixos/modules/services/networking/spacecookie.nix | 7 +++---- pkgs/top-level/all-packages.nix | 3 +++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/nixos/modules/services/networking/spacecookie.nix b/nixos/modules/services/networking/spacecookie.nix index 6af8fe76e46..e0bef9e9628 100644 --- a/nixos/modules/services/networking/spacecookie.nix +++ b/nixos/modules/services/networking/spacecookie.nix @@ -29,10 +29,9 @@ in { package = mkOption { type = types.package; - default = pkgs.haskellPackages.spacecookie; - example = literalExample '' - pkgs.haskell.lib.justStaticExecutables pkgs.haskellPackages.spacecookie - ''; + default = pkgs.spacecookie; + defaultText = literalExample "pkgs.spacecookie"; + example = literalExample "pkgs.haskellPackages.spacecookie"; description = '' The spacecookie derivation to use. This can be used to override the used package or to use another version. diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 403ed59ba32..d4548b93a08 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -19108,6 +19108,9 @@ in sogo = callPackage ../servers/web-apps/sogo { }; + spacecookie = + haskell.lib.justStaticExecutables haskellPackages.spacecookie; + spawn_fcgi = callPackage ../servers/http/spawn-fcgi { }; spring-boot-cli = callPackage ../development/tools/spring-boot-cli { };