Compare commits

..

No commits in common. "87aa7cfa70d8c1d85a4c8fb56d8e1a3a9a7e5964" and "adb53f5e715c96d8a4b0a281513d191c3c8c436c" have entirely different histories.

4 changed files with 1 additions and 61 deletions

View File

@ -7,7 +7,7 @@
devShells = eachSystem (system: let pkgs = import nixpkgs { inherit system; }; devShells = eachSystem (system: let pkgs = import nixpkgs { inherit system; };
in { in {
default = pkgs.mkShell { default = pkgs.mkShell {
buildInputs = with pkgs; [ self.packages.${system}.packwiz-wrapper nix-update ]; buildInputs = with pkgs; [ packwiz nix-update ];
}; };
}); });
packages = eachSystem (system: let pkgs = import nixpkgs { inherit system; }; packages = eachSystem (system: let pkgs = import nixpkgs { inherit system; };

View File

@ -3,5 +3,4 @@ let
shaders = callPackage ./shaders.nix {}; shaders = callPackage ./shaders.nix {};
in { in {
inherit (shaders) bliss-dh complementary-reimagined-dh rethinking-voxels-dh; inherit (shaders) bliss-dh complementary-reimagined-dh rethinking-voxels-dh;
packwiz-wrapper = callPackage ./packwiz-wrapper { };
} }

View File

@ -1,25 +0,0 @@
{ lib,
stdenvNoCC,
python3,
makeWrapper,
packwiz }:
let
wrappedPath = lib.makeBinPath [ packwiz ];
in stdenvNoCC.mkDerivation {
pname = "packwiz-wrapper";
version = "0.0.0";
buildInputs = [
python3
makeWrapper
packwiz
];
src = ./.;
installPhase = ''
install -Dm555 packwiz-wrapper.py $out/libexec/packwiz-wrapper.py
mkdir -p $out/bin
makeShellWrapper $out/libexec/packwiz-wrapper.py $out/bin/packwiz \
--prefix PATH : "${wrappedPath}"
'';
}

View File

@ -1,34 +0,0 @@
#!/usr/bin/env python3
import sys, os
from pathlib import Path
# Returns a parent path with pack.toml, or None if it can't be found
def search_recursive(dir: str | os.PathLike) -> Path | None:
dir = Path(dir)
pack = dir / "pack.toml"
if pack.is_file():
return dir
# If we've made it to / without finding it, return None
if dir.samefile("/"):
return None
# Otherwise, recurse
return search_recursive(dir / "..")
def search(dir: str | os.PathLike) -> Path:
new_dir = search_recursive(dir)
if new_dir is not None:
return new_dir
else:
return Path(dir)
def main():
args = ["packwiz"] + sys.argv[1:]
os.chdir(search("."))
os.execvp("packwiz", args)
if __name__ == "__main__":
main()