2022-11-21 17:40:18 +00:00
|
|
|
{ lib
|
|
|
|
, buildGoModule
|
2022-12-17 10:02:37 +00:00
|
|
|
, fetchFromGitHub
|
2022-11-21 17:40:18 +00:00
|
|
|
, nix
|
|
|
|
, makeWrapper
|
2022-12-17 10:02:37 +00:00
|
|
|
, fetchpatch
|
2022-11-21 17:40:18 +00:00
|
|
|
}:
|
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
buildGoModule {
|
2022-11-21 17:40:18 +00:00
|
|
|
pname = "nc4nix";
|
2023-11-16 04:20:00 +00:00
|
|
|
version = "unstable-2023-11-06";
|
2022-11-21 17:40:18 +00:00
|
|
|
|
2022-12-17 10:02:37 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "helsinki-systems";
|
2022-11-21 17:40:18 +00:00
|
|
|
repo = "nc4nix";
|
2023-11-16 04:20:00 +00:00
|
|
|
rev = "47666b418a71c609f8d2b2c2679956c2ac9818e5";
|
|
|
|
hash = "sha256-cXg0emFFAYI1Jtiz+Xilmct3JNiO9cSWUbghyIRQBnY=";
|
2022-11-21 17:40:18 +00:00
|
|
|
};
|
|
|
|
|
2022-12-17 10:02:37 +00:00
|
|
|
patches = [
|
|
|
|
# Switch hash calculation method
|
2023-07-15 17:15:38 +00:00
|
|
|
# https://github.com/helsinki-systems/nc4nix/pull/3
|
2022-12-17 10:02:37 +00:00
|
|
|
(fetchpatch {
|
2023-07-15 17:15:38 +00:00
|
|
|
url = "https://github.com/helsinki-systems/nc4nix/commit/a7bca4793cc12e87d381f12f6f8c00ae2ca02893.patch";
|
|
|
|
sha256 = "sha256-0JxyhSQLtlgLtsMv82wMjQHGdmOoQ2dcPPNAw2cFByE=";
|
2022-12-17 10:02:37 +00:00
|
|
|
name = "switch_hash_calculation_method.patch";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
vendorHash = "sha256-uhINWxFny/OY7M2vV3ehFzP90J6Z8cn5IZHWOuEg91M=";
|
2022-11-21 17:40:18 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
makeWrapper
|
|
|
|
];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
# Depends on nix-prefetch-url
|
|
|
|
wrapProgram $out/bin/nc4nix \
|
|
|
|
--prefix PATH : ${lib.makeBinPath [ nix ]}
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Packaging helper for Nextcloud apps";
|
2022-12-17 10:02:37 +00:00
|
|
|
homepage = "https://github.com/helsinki-systems/nc4nix";
|
|
|
|
license = licenses.mit;
|
2022-11-21 17:40:18 +00:00
|
|
|
maintainers = with maintainers; [ onny ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|