带推导
let
pkgs = import <nixpkgs> {};
in
with pkgs;
stdenv.mkDerivation {
name = "asdfasdf";
version = "0.1";
src = /home/srghma/opt/foxitsoftware/foxitreader/FoxitReader; # this is executeable file
dontUnpack = true; # not fu**** working
installPhase = ''
echo "not even executed"
'';
}
Run Code Online (Sandbox Code Playgroud)
我有一个错误
nix-build tmp.nix
these derivations will be built:
/nix/store/x75gi70i1i57y8d3k4hhx0r3z5kjn6h6-asdfasdf.drv
building '/nix/store/x75gi70i1i57y8d3k4hhx0r3z5kjn6h6-asdfasdf.drv'...
unpacking sources
unpacking source archive /nix/store/3hnf69pky6mqaxv4jxly9fyywqpq6iml-FoxitReader
do not know how to unpack source archive /nix/store/3hnf69pky6mqaxv4jxly9fyywqpq6iml-FoxitReader
builder for '/nix/store/x75gi70i1i57y8d3k4hhx0r3z5kjn6h6-asdfasdf.drv' failed with exit code 1
error: build of '/nix/store/x75gi70i1i57y8d3k4hhx0r3z5kjn6h6-asdfasdf.drv' failed
Run Code Online (Sandbox Code Playgroud)
为什么dontUnpack不工作?
更新:在 nixpkgs https://github.com/NixOS/nixpkgs/issues/65434创建错误问题
尝试这个:
let
pkgs = import <nixpkgs> {};
in
with pkgs;
stdenv.mkDerivation {
name = "asdfasdf";
version = "0.1";
# Renamed to imply that 'src' functionality is not being used.
executable = /home/srghma/opt/foxitsoftware/foxitreader/FoxitReader; # this is executeable file
phases = [ "installPhase" ]; # Removes all phases except installPhase
installPhase = ''
mkdir -p $out/bin
cp ${executable} $out/bin
'';
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
4769 次 |
| 最近记录: |