pinwheel: Add pants (called through nix-alien) to work module
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
{ pkgs, lib, config, ... }:
|
||||
{ inputs, pkgs, lib, config, ... }:
|
||||
let
|
||||
gitEnabled = config.mod.git.enable;
|
||||
goEnabled = config.mod.go.enable;
|
||||
@@ -14,6 +14,11 @@ 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.jetbrains.plugins.addPlugins pkgs.jetbrains.idea-ultimate [ "ideavim" ])
|
||||
(pkgs.google-cloud-sdk.withExtraComponents [ pkgs.google-cloud-sdk.components.gke-gcloud-auth-plugin ])
|
||||
(pkgs.graphite-cli.overrideAttrs(_: {
|
||||
|
||||
39
hosts/pinwheel/modules/work/pants.nix
Normal file
39
hosts/pinwheel/modules/work/pants.nix
Normal file
@@ -0,0 +1,39 @@
|
||||
{
|
||||
stdenv,
|
||||
fetchurl,
|
||||
writeShellScriptBin,
|
||||
nix-alien,
|
||||
...
|
||||
}:
|
||||
let
|
||||
version = "0.11.0";
|
||||
|
||||
unpatched = stdenv.mkDerivation {
|
||||
name = "scie-pants";
|
||||
version = version;
|
||||
sourceRoot = ".";
|
||||
phases = [
|
||||
"installPhase"
|
||||
"patchPhase"
|
||||
];
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/pantsbuild/scie-pants/releases/download/v${version}/scie-pants-linux-x86_64";
|
||||
sha256 = "sha256-ifP5gjTdLMXyVSKda6pPBNNcnJZ0giuqikFBk7cXgHI=";
|
||||
};
|
||||
|
||||
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 -- "$@"
|
||||
''
|
||||
Reference in New Issue
Block a user