diff --git a/pkgs/by-name/bu/bukubrow/package.nix b/pkgs/by-name/bu/bukubrow/package.nix index 098cebca5692..fd9070899d38 100644 --- a/pkgs/by-name/bu/bukubrow/package.nix +++ b/pkgs/by-name/bu/bukubrow/package.nix @@ -21,18 +21,14 @@ rustPlatform.buildRustPackage (finalAttrs: { src = fetchFromGitHub { owner = "SamHH"; repo = "bukubrow-host"; - rev = "v${finalAttrs.version}"; - sha256 = "sha256-xz5Agsm+ATQXXgpPGN4EQ00i1t8qUlrviNHauVdCu4U="; + tag = "v${finalAttrs.version}"; + hash = "sha256-xz5Agsm+ATQXXgpPGN4EQ00i1t8qUlrviNHauVdCu4U="; }; cargoHash = "sha256-mCPJE9WW14NtahbMnDcE+0xXl5w25dzerPy3wv78l20="; buildInputs = [ sqlite ]; - passAsFile = [ - "firefoxManifest" - "chromeManifest" - ]; firefoxManifest = builtins.toJSON ( manifest // { @@ -46,14 +42,20 @@ rustPlatform.buildRustPackage (finalAttrs: { } ); postBuild = '' - substituteAll $firefoxManifestPath firefox.json - substituteAll $chromeManifestPath chrome.json + printf "%s" "$firefoxManifest" > firefox.json + substituteInPlace firefox.json \ + --replace-fail "@out@" "$out" + printf "%s" "$chromeManifest" > chrome.json + substituteInPlace chrome.json \ + --replace-fail "@out@" "$out" ''; postInstall = '' install -Dm0644 firefox.json $out/lib/mozilla/native-messaging-hosts/com.samhh.bukubrow.json install -Dm0644 chrome.json $out/etc/chromium/native-messaging-hosts/com.samhh.bukubrow.json ''; + __structuredAttrs = true; + meta = { description = "WebExtension for Buku, a command-line bookmark manager"; homepage = "https://github.com/SamHH/bukubrow-host";