mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-09-20 04:19:00 +02:00
Merge pull request #270689 from Misterio77/pureref-download-src
pureref: download source automatically
This commit is contained in:
commit
8cb260087a
|
@ -1,14 +1,16 @@
|
|||
{ lib, appimageTools, requireFile }:
|
||||
{ lib, appimageTools, runCommand, curl, gnugrep, cacert }:
|
||||
|
||||
appimageTools.wrapType1 rec {
|
||||
pname = "pureref";
|
||||
version = "1.11.1";
|
||||
|
||||
src = requireFile {
|
||||
name = "PureRef-${version}_x64.Appimage";
|
||||
sha256 = "05naywdgykqrsgc3xybskr418cyvbx7vqs994yv9w8zf98gxvbvm";
|
||||
url = "https://www.pureref.com/download.php";
|
||||
};
|
||||
src = runCommand "PureRef-${version}_x64.Appimage" {
|
||||
nativeBuildInputs = [ curl gnugrep cacert ];
|
||||
outputHash = "sha256-da/dH0ruI562JylpvE9f2zMUSJ56+T7Y0xlP/xr3yhY=";
|
||||
} ''
|
||||
key="$(curl "https://www.pureref.com/download.php" --silent | grep '%3D%3D' | cut -d '"' -f2)"
|
||||
curl "https://www.pureref.com/files/build.php?build=LINUX64.Appimage&version=${version}&downloadKey=$key" --output $out
|
||||
'';
|
||||
|
||||
extraInstallCommands = ''
|
||||
mv $out/bin/${pname}-${version} $out/bin/${pname}
|
||||
|
|
Loading…
Reference in a new issue