From 1a382e983f9db3ebfc8cf50c2aa036452ef931ee Mon Sep 17 00:00:00 2001 From: Luflosi Date: Wed, 23 Sep 2020 12:01:14 +0200 Subject: [PATCH 1/3] ipfs: remove executable bit from systemd units IPFS would complain with warnings like Configuration file /nix/store/...-ipfs-0.6.0/etc/systemd/system/ipfs.service is marked executable. Please remove executable permission bits. Proceeding anyway. --- pkgs/applications/networking/ipfs/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/networking/ipfs/default.nix b/pkgs/applications/networking/ipfs/default.nix index dbc6dc97ef20..a91058af8908 100644 --- a/pkgs/applications/networking/ipfs/default.nix +++ b/pkgs/applications/networking/ipfs/default.nix @@ -27,9 +27,9 @@ buildGoModule rec { vendorSha256 = null; postInstall = '' - install -D misc/systemd/ipfs.service $out/etc/systemd/system/ipfs.service - install -D misc/systemd/ipfs-api.socket $out/etc/systemd/system/ipfs-api.socket - install -D misc/systemd/ipfs-gateway.socket $out/etc/systemd/system/ipfs-gateway.socket + install --mode=444 -D misc/systemd/ipfs.service $out/etc/systemd/system/ipfs.service + install --mode=444 -D misc/systemd/ipfs-api.socket $out/etc/systemd/system/ipfs-api.socket + install --mode=444 -D misc/systemd/ipfs-gateway.socket $out/etc/systemd/system/ipfs-gateway.socket substituteInPlace $out/etc/systemd/system/ipfs.service \ --replace /usr/bin/ipfs $out/bin/ipfs ''; From d385065f705d10ce7738ae4f025fa8a142d3a26c Mon Sep 17 00:00:00 2001 From: Luflosi Date: Wed, 23 Sep 2020 12:06:44 +0200 Subject: [PATCH 2/3] ipfs: avoid warning during build when moving directory Trying to move a directory into itself will result in a warning: mv: cannot move 'ipfs-src' to a subdirectory of itself, 'ipfs-src/ipfs-src' This can be prevented by excluding that directory. --- pkgs/applications/networking/ipfs/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/networking/ipfs/default.nix b/pkgs/applications/networking/ipfs/default.nix index a91058af8908..5d1289edc333 100644 --- a/pkgs/applications/networking/ipfs/default.nix +++ b/pkgs/applications/networking/ipfs/default.nix @@ -14,7 +14,8 @@ buildGoModule rec { # tarball contains multiple files/directories postUnpack = '' mkdir ipfs-src - mv * ipfs-src || true + shopt -s extglob + mv !(ipfs-src) ipfs-src || true cd ipfs-src ''; From b75e4314544ae220a69d13fbd7676d85437fa15c Mon Sep 17 00:00:00 2001 From: Luflosi Date: Wed, 23 Sep 2020 12:14:14 +0200 Subject: [PATCH 3/3] ipfs: 0.6.0 -> 0.7.0 https://github.com/ipfs/go-ipfs/releases/tag/v0.7.0 Pinning go114 is no longer necessary with this version. --- pkgs/applications/networking/ipfs/default.nix | 4 ++-- pkgs/top-level/all-packages.nix | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/pkgs/applications/networking/ipfs/default.nix b/pkgs/applications/networking/ipfs/default.nix index 5d1289edc333..01e808a9e725 100644 --- a/pkgs/applications/networking/ipfs/default.nix +++ b/pkgs/applications/networking/ipfs/default.nix @@ -2,13 +2,13 @@ buildGoModule rec { pname = "ipfs"; - version = "0.6.0"; + version = "0.7.0"; rev = "v${version}"; # go-ipfs makes changes to it's source tarball that don't match the git source. src = fetchurl { url = "https://github.com/ipfs/go-ipfs/releases/download/${rev}/go-ipfs-source.tar.gz"; - sha256 = "14bgq2j2bjjy0pspy2lsj5dm3w9rmfha0l8kyq5ig86yhc4nzn80"; + sha256 = "1fkzwm4qxxpmbjammk6s5qcyjxivfa0ydqz4mpz1w756c4jq0jf3"; }; # tarball contains multiple files/directories diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ef348253cc6a..04e01d26483b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4605,9 +4605,7 @@ in iperf3 = callPackage ../tools/networking/iperf/3.nix { }; iperf = iperf3; - ipfs = callPackage ../applications/networking/ipfs { - buildGoModule = buildGo114Module; - }; + ipfs = callPackage ../applications/networking/ipfs { }; ipfs-migrator = callPackage ../applications/networking/ipfs-migrator { }; ipfs-cluster = callPackage ../applications/networking/ipfs-cluster { buildGoModule = buildGo114Module;