bundlerUpdateScript: init and use (#64822)
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
, document ? []
|
||||
, meta ? {}
|
||||
, ignoreCollisions ? false
|
||||
, passthru ? {}
|
||||
, ...
|
||||
}@args:
|
||||
|
||||
@@ -55,5 +56,5 @@ in
|
||||
passthru = basicEnv.passthru // {
|
||||
inherit basicEnv;
|
||||
inherit (basicEnv) env;
|
||||
};
|
||||
} // passthru;
|
||||
})
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
{ runtimeShell, lib, writeScript, bundix, bundler, bundler-audit, coreutils, git, nix }:
|
||||
|
||||
attrPath:
|
||||
|
||||
let
|
||||
updateScript = writeScript "bundler-update-script" ''
|
||||
#!${runtimeShell}
|
||||
PATH=${lib.makeBinPath [ bundler bundler-audit bundix coreutils git nix ]}
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
attrPath=$1
|
||||
|
||||
toplevel=$(git rev-parse --show-toplevel)
|
||||
position=$(nix eval -f "$toplevel" --raw "$attrPath.meta.position")
|
||||
gemdir=$(dirname "$position")
|
||||
|
||||
cd "$gemdir"
|
||||
|
||||
bundler lock --update
|
||||
bundler-audit check --update
|
||||
bundix
|
||||
'';
|
||||
in [ updateScript attrPath ]
|
||||
@@ -1,15 +1,17 @@
|
||||
{ lib, bundlerApp }:
|
||||
{ lib, bundlerApp, bundlerUpdateScript }:
|
||||
|
||||
bundlerApp rec {
|
||||
pname = "solargraph";
|
||||
exes = ["solargraph" "solargraph-runtime"];
|
||||
gemdir = ./.;
|
||||
|
||||
passthru.updateScript = bundlerUpdateScript "solargraph";
|
||||
|
||||
meta = with lib; {
|
||||
description = "IDE tools for the Ruby language";
|
||||
homepage = http://www.github.com/castwide/solargraph;
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ worldofpeace ];
|
||||
maintainers = with maintainers; [ worldofpeace nicknovitski ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user