10 version = "0.29.0"; # When updating, also check if the repo version changed and adjust repoVersion below
13 passthru.repoVersion = "15"; # Also update kubo-migrator when changing the repo version
15 # Kubo makes changes to its source tarball that don't match the git source.
17 url = "https://github.com/ipfs/kubo/releases/download/${rev}/kubo-source.tar.gz";
18 hash = "sha256-udCVyA3NN3RCmVtdIjccfy/RymvrsGJoxlF8DiapP4g=";
21 # tarball contains multiple files/directories
25 mv !(kubo-src) kubo-src || true
31 subPackages = [ "cmd/ipfs" ];
34 inherit (nixosTests) kubo;
35 repoVersion = callPackage ./test-repoVersion.nix {};
40 outputs = [ "out" "systemd_unit" "systemd_unit_hardened" ];
43 substituteInPlace 'misc/systemd/ipfs.service' \
44 --replace-fail '/usr/local/bin/ipfs' "$out/bin/ipfs"
45 substituteInPlace 'misc/systemd/ipfs-hardened.service' \
46 --replace-fail '/usr/local/bin/ipfs' "$out/bin/ipfs"
50 install --mode=444 -D 'misc/systemd/ipfs-api.socket' "$systemd_unit/etc/systemd/system/ipfs-api.socket"
51 install --mode=444 -D 'misc/systemd/ipfs-gateway.socket' "$systemd_unit/etc/systemd/system/ipfs-gateway.socket"
52 install --mode=444 -D 'misc/systemd/ipfs.service' "$systemd_unit/etc/systemd/system/ipfs.service"
54 install --mode=444 -D 'misc/systemd/ipfs-api.socket' "$systemd_unit_hardened/etc/systemd/system/ipfs-api.socket"
55 install --mode=444 -D 'misc/systemd/ipfs-gateway.socket' "$systemd_unit_hardened/etc/systemd/system/ipfs-gateway.socket"
56 install --mode=444 -D 'misc/systemd/ipfs-hardened.service' "$systemd_unit_hardened/etc/systemd/system/ipfs.service"
60 description = "IPFS implementation in Go";
61 homepage = "https://ipfs.io/";
62 changelog = "https://github.com/ipfs/kubo/releases/tag/${rev}";
63 license = licenses.mit;
64 platforms = platforms.unix;
66 maintainers = with maintainers; [ Luflosi fpletz ];