packages/lain-ipfs: rename to ipfs, 0.12.2 -> 0.13.0, update patchset

This commit is contained in:
Max Headroom 2022-06-18 15:17:08 +02:00
parent 59d5f9d884
commit 466bbc86ba
7 changed files with 72 additions and 3 deletions

View file

@ -0,0 +1,69 @@
{ lib, buildGoModule, fetchurl, nixosTests, openssl, pkg-config }:
buildGoModule rec {
pname = "ipfs";
version = "0.13.0"; # When updating, also check if the repo version changed and adjust repoVersion below
rev = "v${version}";
repoVersion = "12"; # Also update ipfs-migrator when changing the repo 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 = "sha256-eEIHsmtD3vF48RVFHEz28gkVv7u50pMBE8Z+oaM6pLM=";
};
# tarball contains multiple files/directories
postUnpack = ''
mkdir ipfs-src
shopt -s extglob
mv !(ipfs-src) ipfs-src || true
cd ipfs-src
'';
sourceRoot = ".";
subPackages = [ "cmd/ipfs" ];
buildInputs = [ openssl ];
nativeBuildInputs = [ pkg-config ];
tags = [ "openssl" ];
passthru.tests.ipfs = nixosTests.ipfs;
vendorSha256 = null;
outputs = [ "out" "systemd_unit" "systemd_unit_hardened" ];
patches = [
./ipfs-allow-publish-with-ipns-mounted.patch
./ipfs-fuse-nuke-getxattr.patch
./ipfs-unsafe-allow-all-paths-for-filestore.patch
./lain-webui-0.13.0.patch
];
postPatch = ''
substituteInPlace 'misc/systemd/ipfs.service' \
--replace '/usr/bin/ipfs' "$out/bin/ipfs"
substituteInPlace 'misc/systemd/ipfs-hardened.service' \
--replace '/usr/bin/ipfs' "$out/bin/ipfs"
'';
postInstall = ''
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"
'';
meta = with lib; {
description = "A global, versioned, peer-to-peer filesystem";
homepage = "https://ipfs.io/";
license = licenses.mit;
platforms = platforms.unix;
maintainers = with maintainers; [ fpletz ];
};
}

View file

@ -4,7 +4,7 @@
package corehttp
// TODO: move to IPNS
-const WebUIPath = "/ipfs/bafybeihcyruaeza7uyjd6ugicbcrqumejf6uf353e5etdkhotqffwtguva" // v2.13.0
-const WebUIPath = "/ipfs/bafybeiednzu62vskme5wpoj4bjjikeg3xovfpp4t7vxk5ty2jxdi4mv4bu" // v2.15.0
+const WebUIPath = "/ipns/webui.ipfs.privatevoid.net"
// this is a list of all past webUI paths.

View file

@ -3,8 +3,6 @@ in with tools;
super: rec {
hydra = (patch super.hydra-unstable "patches/base/hydra").override { nix = super.nixVersions.nix_2_8; };
lain-ipfs = patch-rename (super.ipfs_latest or super.ipfs) "lain-ipfs" "patches/base/ipfs";
sssd = (super.sssd.override { withSudo = true; }).overrideAttrs (old: {
postFixup = (old.postFixup or "") + ''
${super.removeReferencesTo}/bin/remove-references-to -t ${super.stdenv.cc.cc} $out/modules/ldb/memberof.so

View file

@ -44,6 +44,8 @@ in
hyprspace = pkgs.callPackage ./networking/hyprspace { iproute2mac = null; };
ipfs = pkgs.callPackage ./networking/ipfs { };
npins = let
inherit (inputs.self.packages.${system}) nix-super;
in pkgs.callPackage ./tools/npins {