This commit is contained in:
Charlotte 🦝 Delenk 2023-05-10 08:29:31 +01:00
parent de1192a47f
commit 7d280daa86
Signed by: darkkirb
GPG key ID: AB2BD8DAF2E37122

View file

@ -43,12 +43,21 @@ in
--replace '/usr/bin/ipfs' "$out/bin/ipfs"
'';
outputs = ["out" "systemd_unit" "systemd_unit_hardened"];
buildPhase = ''
make build
'';
installPhase = ''
GOBIN=$out/bin make install
install --mode=444 -D 'misc/systemd/ipfs-api.socket' "$systemd_unit/etc/systemd/system/ipfs-api.socket"
install --mode=444 -D 'misc/systemd/ipfs-gateway.socket' "$systemd_unit/etc/systemd/system/ipfs-gateway.socket"
install --mode=444 -D 'misc/systemd/ipfs.service' "$systemd_unit/etc/systemd/system/ipfs.service"
install --mode=444 -D 'misc/systemd/ipfs-api.socket' "$systemd_unit_hardened/etc/systemd/system/ipfs-api.socket"
install --mode=444 -D 'misc/systemd/ipfs-gateway.socket' "$systemd_unit_hardened/etc/systemd/system/ipfs-gateway.socket"
install --mode=444 -D 'misc/systemd/ipfs-hardened.service' "$systemd_unit_hardened/etc/systemd/system/ipfs.service"
'';
passthru.updateScript = writeScript "update-matrix-media-repo" ''
${../../scripts/update-git.sh} "https://github.com/ipfs/kubo" ipfs/kubo/source.json