diff --git a/mods/nurPkgs/minecraft-server-whitelist-all-players.nix b/mods/nurPkgs/minecraft-server-whitelist-all-players.nix index b2c033d..5083d3f 100644 --- a/mods/nurPkgs/minecraft-server-whitelist-all-players.nix +++ b/mods/nurPkgs/minecraft-server-whitelist-all-players.nix @@ -1,18 +1,26 @@ { lib , python3Packages +, python3 +, stdenv }: -python3Packages.buildPythonApplication { +stdenv.mkDerivation { pname = "minecraft-server-whitelist-all-players"; version = "1.0"; pyproject = false; - propagatedBuildInputs = with python3Packages; [ requests ]; + propagatedBuildInputs = [ + (python3.withPackages (pythonPackages: with pythonPackages; [ + requests + ])) + ]; dontUnpack = true; src = ./.; + installPhase = "install -Dm755 ${./minecraft-server-whitelist-all-players.py} $out/bin/minecraft-server-whitelist-all-players"; + meta = with lib; { description = "A small python script to generate a whitelist.json from all players that ever joined the server."; longDescription = '' diff --git a/nur.nix b/nur.nix index 189aaf9..881e96c 100644 --- a/nur.nix +++ b/nur.nix @@ -5,8 +5,8 @@ let lib = pkgs.lib; - files = builtins.readDir ./mods/nurPkgs; - names = pkgs.lib.attrsets.mapAttrsToList (name: value: pkgs.lib.strings.removeSuffix ".nix" name) files; + files = builtins.filter (el: lib.strings.hasSuffix ".nix" el) (lib.attrsets.mapAttrsToList (name: value: name) (builtins.readDir ./mods/nurPkgs)); + names = map (value: lib.strings.removeSuffix ".nix" value) files; pwd = builtins.toString ./.; in pkgs.lib.attrsets.genAttrs names (name: (pkgs.callPackage "${pwd}/mods/nurPkgs/${name}.nix" {})) //