OSXでNixパッケージマネージャを使用し始めましたが、pass
バイナリ(https://www.passwordstore.org)の最初のパッケージを作成しようとしています。これはNixpkgsリポジトリでは利用できません。Nixパッケージのランタイム依存関係を指定する
ランタイム依存関係(getopt
)を指定しようとしていますが、バイナリを使用している場合は表示されません。
{ pkgs ? import <nixpkgs> {} }:
with pkgs;
let
version = "1.7.1";
in {
pass = stdenv.mkDerivation rec {
name = "pass-${version}";
src = fetchurl {
url = "https://git.zx2c4.com/password-store/snapshot/password-store-1.7.1.tar.xz";
sha256 = "0scqkpll2q8jhzcgcsh9kqz0gwdpvynivqjmmbzax2irjfaiklpn";
};
buildInputs = [ stdenv makeWrapper];
installPhase = ''
make install PREFIX=$out/artifact
makeWrapper $out/artifact/bin/pass $out/bin/pass \
--set PATH ${stdenv.lib.makeBinPath [ getopt ]}
'';
meta = {
homepage = "https://www.passwordstore.org";
description = "The standard unix password manager";
license = stdenv.lib.licenses.gpl2Plus;
};
};
}
私は正常にこのパッケージ(nix-build --show-trace
)を構築し、それをインストールすることができます(nix-env -i ./result
):
は、これは私のパッケージのdefault.nixです。私のパッケージの実行時の依存関係をリスト
がgetopt
が記載されている例を示します
nix-store -qR $(which pass)
...
/nix/store/c5swmygzc0kmvpq6cfkvwm2yz1k57kqy-getopt-1.1.4
私はバイナリ(pass init my-key
)を使用して来るときしかし、私は次のエラーを取得する:
/nix/store/...-pass-1.7.1/artifact/bin/pass: line 302:
/usr/local/bin/getopt: No such file or directory
誰が何を助言することができ私は間違っている?
おかげ
を参照して、ソースコードにパッチを適用するために
(
openbsd.sh
に似ている)GETOPT=getopt
な限りシンプルにすることができます。それらにパッチを当てる必要があるかもしれません。 –生態系の他の部分では、/artifact/binではなく、/binにバイナリがあると想定されるため、おそらく.../artifactを省略する必要があります。 (おそらくあなたの問題の原因ではない) –
楽しい事実:あなたはURLを引用符で囲むことができます。 –