scli: fix version
This commit is contained in:
parent
0db4454499
commit
90bca32e90
|
@ -4,6 +4,8 @@
|
||||||
, dbus
|
, dbus
|
||||||
, signal-cli
|
, signal-cli
|
||||||
, xclip
|
, xclip
|
||||||
|
, testers
|
||||||
|
, scli
|
||||||
}:
|
}:
|
||||||
|
|
||||||
python3.pkgs.buildPythonApplication rec {
|
python3.pkgs.buildPythonApplication rec {
|
||||||
|
@ -26,24 +28,27 @@ python3.pkgs.buildPythonApplication rec {
|
||||||
|
|
||||||
dontBuild = true;
|
dontBuild = true;
|
||||||
|
|
||||||
checkPhase = ''
|
|
||||||
# scli attempts to write to these directories, make sure they're writeable
|
|
||||||
export XDG_DATA_HOME=$(mktemp -d)
|
|
||||||
export XDG_CONFIG_HOME=$(mktemp -d)
|
|
||||||
./scli --help > /dev/null # don't spam nix-build log
|
|
||||||
test $? == 0
|
|
||||||
'';
|
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/bin
|
runHook preInstall
|
||||||
|
|
||||||
patchShebangs scli
|
patchShebangs scli
|
||||||
install -m755 -D scli $out/bin/scli
|
install -Dm555 scli -t $out/bin
|
||||||
|
echo "v$version" > $out/bin/VERSION
|
||||||
|
|
||||||
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
|
|
||||||
makeWrapperArgs = [
|
makeWrapperArgs = [
|
||||||
"--prefix" "PATH" ":" (lib.makeBinPath [ dbus signal-cli xclip ])
|
"--prefix" "PATH" ":" (lib.makeBinPath [ dbus signal-cli xclip ])
|
||||||
];
|
];
|
||||||
|
|
||||||
|
passthru.tests = {
|
||||||
|
version = testers.testVersion {
|
||||||
|
package = scli;
|
||||||
|
command = "HOME=$(mktemp -d) scli --version";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Simple terminal user interface for Signal";
|
description = "Simple terminal user interface for Signal";
|
||||||
homepage = "https://github.com/isamert/scli";
|
homepage = "https://github.com/isamert/scli";
|
||||||
|
|
Loading…
Reference in a new issue