diff --git a/flake.lock b/flake.lock index eb69022..8e5f771 100644 --- a/flake.lock +++ b/flake.lock @@ -67,21 +67,6 @@ "type": "github" } }, - "flake-compat": { - "locked": { - "lastModified": 1696426674, - "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, "flake-utils": { "inputs": { "systems": "systems_2" @@ -100,24 +85,6 @@ "type": "github" } }, - "flake-utils_2": { - "inputs": { - "systems": "systems_3" - }, - "locked": { - "lastModified": 1710146030, - "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, "home-manager": { "inputs": { "nixpkgs": [ @@ -199,63 +166,6 @@ "type": "github" } }, - "nix-alien": { - "inputs": { - "flake-compat": "flake-compat", - "flake-utils": "flake-utils_2", - "nix-filter": "nix-filter", - "nix-index-database": "nix-index-database", - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1718448591, - "narHash": "sha256-TDzUlwvCmkY4IzEMLV7vmB/GlKznsS+/oBO4Z6z9ACE=", - "owner": "thiagokokada", - "repo": "nix-alien", - "rev": "d457975f39a4eaf8bec55b7cc3ff26226d4fb062", - "type": "github" - }, - "original": { - "owner": "thiagokokada", - "repo": "nix-alien", - "type": "github" - } - }, - "nix-filter": { - "locked": { - "lastModified": 1710156097, - "narHash": "sha256-1Wvk8UP7PXdf8bCCaEoMnOT1qe5/Duqgj+rL8sRQsSM=", - "owner": "numtide", - "repo": "nix-filter", - "rev": "3342559a24e85fc164b295c3444e8a139924675b", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "nix-filter", - "type": "github" - } - }, - "nix-index-database": { - "inputs": { - "nixpkgs": "nixpkgs" - }, - "locked": { - "lastModified": 1718011381, - "narHash": "sha256-sFXI+ZANp/OC+MwfJoZgPSf4xMdtzQMe1pS3FGti4C8=", - "owner": "nix-community", - "repo": "nix-index-database", - "rev": "88ad3d7501e22b2401dd72734b032b7baa794434", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "nix-index-database", - "type": "github" - } - }, "nixos-hardware": { "locked": { "lastModified": 1720737798, @@ -274,15 +184,15 @@ }, "nixpkgs": { "locked": { - "lastModified": 1717786204, - "narHash": "sha256-4q0s6m0GUcN7q+Y2DqD27iLvbcd1G50T2lv08kKxkSI=", - "owner": "NixOS", + "lastModified": 1720768451, + "narHash": "sha256-EYekUHJE2gxeo2pM/zM9Wlqw1Uw2XTJXOSAO79ksc4Y=", + "owner": "nixos", "repo": "nixpkgs", - "rev": "051f920625ab5aabe37c920346e3e69d7d34400e", + "rev": "7e7c39ea35c5cdd002cd4588b03a3fb9ece6fad9", "type": "github" }, "original": { - "owner": "NixOS", + "owner": "nixos", "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" @@ -304,22 +214,6 @@ "type": "github" } }, - "nixpkgs_2": { - "locked": { - "lastModified": 1720768451, - "narHash": "sha256-EYekUHJE2gxeo2pM/zM9Wlqw1Uw2XTJXOSAO79ksc4Y=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "7e7c39ea35c5cdd002cd4588b03a3fb9ece6fad9", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, "pppdotpm-site": { "inputs": { "nixpkgs": [ @@ -348,9 +242,8 @@ "home-manager": "home-manager_2", "hyprland-contrib": "hyprland-contrib", "nh": "nh", - "nix-alien": "nix-alien", "nixos-hardware": "nixos-hardware", - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs", "pppdotpm-site": "pppdotpm-site" } }, @@ -383,21 +276,6 @@ "repo": "default", "type": "github" } - }, - "systems_3": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } } }, "root": "root", diff --git a/flake.nix b/flake.nix index c208521..121f8f9 100644 --- a/flake.nix +++ b/flake.nix @@ -31,11 +31,6 @@ inputs.nixpkgs.follows = "nixpkgs"; }; - nix-alien = { - url = "github:thiagokokada/nix-alien"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - pppdotpm-site = { url = "git+ssh://git@codeberg.org/ppp/ppp.pm-site.git?ref=main"; inputs.nixpkgs.follows = "nixpkgs"; diff --git a/hosts/pinwheel/modules/work/default.nix b/hosts/pinwheel/modules/work/default.nix index c593c64..297e9ce 100644 --- a/hosts/pinwheel/modules/work/default.nix +++ b/hosts/pinwheel/modules/work/default.nix @@ -13,11 +13,7 @@ in home.packages = [ (pkgs.callPackage ./syb-cli.nix {}) - - (pkgs.callPackage ./pants.nix { - nix-alien = inputs.nix-alien.packages."${pkgs.system}".nix-alien; - }) - pkgs.unzip # needed by pants + (pkgs.callPackage ./pants.nix {}) (pkgs.jetbrains.plugins.addPlugins pkgs.jetbrains.idea-ultimate [ "ideavim" ]) (pkgs.google-cloud-sdk.withExtraComponents [ pkgs.google-cloud-sdk.components.gke-gcloud-auth-plugin ]) diff --git a/hosts/pinwheel/modules/work/pants.nix b/hosts/pinwheel/modules/work/pants.nix index 9a761fc..6a424e4 100644 --- a/hosts/pinwheel/modules/work/pants.nix +++ b/hosts/pinwheel/modules/work/pants.nix @@ -1,39 +1,47 @@ { - stdenv, fetchurl, - writeShellScriptBin, - nix-alien, - ... + pkgs, + lib, }: let - version = "0.11.0"; + pname = "pants"; + version = "0.12.0"; - unpatched = stdenv.mkDerivation { - name = "scie-pants"; - version = version; - sourceRoot = "."; - phases = [ - "installPhase" - "patchPhase" - ]; + scie-pants = pkgs.stdenv.mkDerivation { + inherit pname version; src = fetchurl { - url = "https://github.com/pantsbuild/scie-pants/releases/download/v${version}/scie-pants-linux-x86_64"; - sha256 = "sha256-ifP5gjTdLMXyVSKda6pPBNNcnJZ0giuqikFBk7cXgHI="; + url = "https://github.com/pantsbuild/scie-pants/releases/download/v${version}/scie-${pname}-linux-x86_64"; + hash = "sha256-9PjgobndxVqDTYGtw1HESrtzwzH2qE9zFwR26xtwZrM="; }; + phases = ["installPhase" "patchPhase"]; installPhase = '' - runHook preInstall - mkdir -p $out/bin cp $src $out/bin/pants chmod +x $out/bin/pants - - runHook postInstall ''; }; in -writeShellScriptBin "pants" '' - export LD_LIBRARY_PATH=$NIX_LD_LIBRARY_PATH - ${nix-alien}/bin/nix-alien ${unpatched}/bin/pants -- "$@" -'' +pkgs.buildFHSUserEnv { + name = "pants"; + + targetPackages = with pkgs; [ + python39 + ]; + + runScript = "${scie-pants}/bin/pants"; + profile = '' + export NIX_SSL_CERT_FILE="/etc/ssl/certs/ca-certificates.crt" + export SSL_CERT_FILE="/etc/ssl/certs/ca-bundle.crt" + ''; + + meta = with lib; { + description = "Protects your Pants from the elements"; + homepage = "https://github.com/pantsbuild/scie-pants"; + license = licenses.asl20; + maintainers = []; + platforms = [ "x86_64-linux" ]; + mainProgram = "pants"; + }; +}