nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 rustPlatform,
4 fetchFromGitHub,
5 wrapGAppsHook4,
6 pkg-config,
7 fuse,
8 glib,
9 gtk4,
10 hicolor-icon-theme,
11 libadwaita,
12 pango,
13 webkitgtk_6_0,
14 nix-update-script,
15 nixosTests,
16}:
17
18rustPlatform.buildRustPackage (finalAttrs: {
19 pname = "oku";
20 version = "0.1.1";
21
22 src = fetchFromGitHub {
23 owner = "okubrowser";
24 repo = "oku";
25 tag = "v${finalAttrs.version}";
26 hash = "sha256-utbey8DFXUWU6u2H2unNjCHE3/bwhPdrxAOApC+unGA=";
27 };
28
29 # Avoiding optimizations for reproducibility
30 prePatch = ''
31 substituteInPlace .cargo/config.toml \
32 --replace-fail '"-C", "target-cpu=native", ' ""
33 '';
34
35 cargoHash = "sha256-rwf9jdr+RDpUcTEG7Xhpph0zuyz6tdFx6hWEZRuxkTY=";
36
37 nativeBuildInputs = [
38 wrapGAppsHook4
39 pkg-config
40 ];
41
42 buildInputs = [
43 fuse
44 glib
45 gtk4
46 hicolor-icon-theme
47 libadwaita
48 pango
49 webkitgtk_6_0
50 ];
51
52 # the program expects icons to be installed but the
53 # program does not install them itself
54 postInstall = ''
55 mkdir -p $out/share/icons
56 cp -r ${finalAttrs.src}/data/hicolor $out/share/icons
57 '';
58
59 passthru = {
60 updateScript = nix-update-script { };
61 tests = { inherit (nixosTests) oku; };
62 };
63
64 meta = {
65 description = "Browser for the Oku Network and Peer-to-peer sites";
66 homepage = "https://github.com/okubrowser/oku";
67 changelog = "https://github.com/OkuBrowser/oku/releases/tag/v${finalAttrs.version}";
68 license = lib.licenses.agpl3Plus;
69 maintainers = with lib.maintainers; [ ethancedwards8 ];
70 teams = with lib.teams; [ ngi ];
71 mainProgram = "oku";
72 platforms = lib.platforms.linux;
73 };
74})