forked from mirrors/nixpkgs
Merge pull request #53393 from srghma/hubstaff_143
hubstaff: 1.3.1 → 1.4.5
This commit is contained in:
commit
78526a79da
|
@ -5,7 +5,9 @@
|
||||||
|
|
||||||
let
|
let
|
||||||
|
|
||||||
version = "1.3.1-ff75f26";
|
data = builtins.fromJSON (builtins.readFile ./revision.json);
|
||||||
|
|
||||||
|
inherit (data) version url sha256;
|
||||||
|
|
||||||
rpath = stdenv.lib.makeLibraryPath
|
rpath = stdenv.lib.makeLibraryPath
|
||||||
[ libX11 zlib libSM libICE libXext freetype libXrender fontconfig libXft
|
[ libX11 zlib libSM libICE libXext freetype libXrender fontconfig libXft
|
||||||
|
@ -17,10 +19,7 @@ in
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "hubstaff-${version}";
|
name = "hubstaff-${version}";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl { inherit sha256 url; };
|
||||||
url = "https://hubstaff-production.s3.amazonaws.com/downloads/HubstaffClient/Builds/Release/${version}/Hubstaff-${version}.sh";
|
|
||||||
sha256 = "0jm5l34r6lkfkg8vsdfqbr0axngxznhagwcl9y184lnyji91fmdl";
|
|
||||||
};
|
|
||||||
|
|
||||||
nativeBuildInputs = [ unzip makeWrapper ];
|
nativeBuildInputs = [ unzip makeWrapper ];
|
||||||
|
|
||||||
|
|
5
pkgs/applications/misc/hubstaff/revision.json
Normal file
5
pkgs/applications/misc/hubstaff/revision.json
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"url": "https://hubstaff-production.s3.amazonaws.com/downloads/HubstaffClient/Builds/Release/1.4.5-c5b459ea/Hubstaff-1.4.5-c5b459ea.sh",
|
||||||
|
"version": "1.4.5-c5b459ea",
|
||||||
|
"sha256": "180qglbj175wln0kh8d5czhjvy7z503zxn4w6522hkz4ddz201nz"
|
||||||
|
}
|
18
pkgs/applications/misc/hubstaff/update.sh
Executable file
18
pkgs/applications/misc/hubstaff/update.sh
Executable file
|
@ -0,0 +1,18 @@
|
||||||
|
#!/usr/bin/env nix-shell
|
||||||
|
#!nix-shell -i bash -p nix-prefetch-git curl
|
||||||
|
|
||||||
|
SCRIPT_DIR=$(dirname "$(readlink -f "$BASH_SOURCE")")
|
||||||
|
|
||||||
|
installation_script_url=$(curl --fail --head --location --silent --output /dev/null --write-out %{url_effective} https://app.hubstaff.com/download/linux)
|
||||||
|
|
||||||
|
version=$(echo "$installation_script_url" | sed -r 's/^https:\/\/hubstaff\-production\.s3\.amazonaws\.com\/downloads\/HubstaffClient\/Builds\/Release\/([^\/]+)\/Hubstaff.+$/\1/')
|
||||||
|
|
||||||
|
sha256=$(nix-prefetch-url "$installation_script_url")
|
||||||
|
|
||||||
|
cat <<EOT > $SCRIPT_DIR/revision.json
|
||||||
|
{
|
||||||
|
"url": "$installation_script_url",
|
||||||
|
"version": "$version",
|
||||||
|
"sha256": "$sha256"
|
||||||
|
}
|
||||||
|
EOT
|
Loading…
Reference in a new issue