Merge master into staging-next

This commit is contained in:
github-actions[bot] 2023-07-15 00:02:34 +00:00 committed by GitHub
commit 73205ff524
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
36 changed files with 278 additions and 159 deletions

View file

@ -37,6 +37,10 @@ rec {
config = "armv6l-unknown-linux-gnueabihf"; config = "armv6l-unknown-linux-gnueabihf";
} // platforms.raspberrypi; } // platforms.raspberrypi;
bluefield2 = {
config = "aarch64-unknown-linux-gnu";
} // platforms.bluefield2;
remarkable1 = { remarkable1 = {
config = "armv7l-unknown-linux-gnueabihf"; config = "armv7l-unknown-linux-gnueabihf";
} // platforms.zero-gravitas; } // platforms.zero-gravitas;

View file

@ -209,6 +209,14 @@ rec {
# Legacy attribute, for compatibility with existing configs only. # Legacy attribute, for compatibility with existing configs only.
raspberrypi2 = armv7l-hf-multiplatform; raspberrypi2 = armv7l-hf-multiplatform;
# Nvidia Bluefield 2 (w. crypto support)
bluefield2 = {
gcc = {
arch = "armv8-a+fp+simd+crc+crypto";
cpu = "cortex-a72";
};
};
zero-gravitas = { zero-gravitas = {
linux-kernel = { linux-kernel = {
name = "zero-gravitas"; name = "zero-gravitas";

View file

@ -14,7 +14,9 @@ let
# taken from https://github.com/python/cpython/blob/05cb728d68a278d11466f9a6c8258d914135c96c/Lib/re.py#L251-L266 # taken from https://github.com/python/cpython/blob/05cb728d68a278d11466f9a6c8258d914135c96c/Lib/re.py#L251-L266
special = [ special = [
"(" ")" "[" "]" "{" "}" "?" "*" "+" "-" "|" "^" "$" "\\" "." "&" "~" "(" ")" "[" "]" "{" "}" "?" "*" "+" "-" "|" "^" "$" "\\" "." "&" "~"
"#" " " "\t" "\n" "\r" "\v" "\f" "#" " " "\t" "\n" "\r"
" " # \v / 0x0B
" " # \f / 0x0C
]; ];
in in
replaceStrings special (map (c: "\\${c}") special); replaceStrings special (map (c: "\\${c}") special);

View file

@ -34,8 +34,11 @@ stdenv.mkDerivation (finalAttrs: {
preFixup = '' preFixup = ''
wrapQtApp "$out/bin/fs-uae-launcher" \ wrapQtApp "$out/bin/fs-uae-launcher" \
--set PYTHONPATH "$PYTHONPATH" \ --set PYTHONPATH "$PYTHONPATH"
--prefix PATH : ${lib.makeBinPath [ fsuae ]}
# fs-uae-launcher search side by side for fs-uae
# see $src/fsgs/plugins/pluginexecutablefinder.py#find_executable
ln -s ${fsuae}/bin/fs-uae $out/bin
''; '';
meta = { meta = {

View file

@ -20,13 +20,13 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "otpclient"; pname = "otpclient";
version = "3.1.8"; version = "3.1.9";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "paolostivanin"; owner = "paolostivanin";
repo = pname; repo = pname;
rev = "refs/tags/v${version}"; rev = "refs/tags/v${version}";
hash = "sha256-wwK8JI/IP89aRmetUXE+RlrqU8bpfIkzMZ9nF7qFe1Q="; hash = "sha256-FSXUqnES/YxONwLza4N2C4Ks02OOfRaXHbdBxr85sFg=";
}; };
nativeBuildInputs = [ nativeBuildInputs = [

View file

@ -1,5 +1,4 @@
{ lib, stdenv, fetchurl, wrapGAppsHook, makeWrapper { lib, stdenv, fetchurl, wrapGAppsHook, makeWrapper
, dpkg
, alsa-lib , alsa-lib
, at-spi2-atk , at-spi2-atk
, at-spi2-core , at-spi2-core
@ -7,6 +6,7 @@
, cairo , cairo
, cups , cups
, dbus , dbus
, dpkg
, expat , expat
, fontconfig , fontconfig
, freetype , freetype
@ -15,32 +15,33 @@
, gnome , gnome
, gsettings-desktop-schemas , gsettings-desktop-schemas
, gtk3 , gtk3
, libuuid
, libdrm
, libX11 , libX11
, libXScrnSaver
, libXcomposite , libXcomposite
, libXcursor , libXcursor
, libXdamage , libXdamage
, libXext , libXext
, libXfixes , libXfixes
, libXi , libXi
, libxkbcommon
, libXrandr , libXrandr
, libXrender , libXrender
, libXScrnSaver
, libxshmfence
, libXtst , libXtst
, libdrm
, libkrb5
, libuuid
, libxkbcommon
, libxshmfence
, mesa , mesa
, nspr , nspr
, nss , nss
, pango , pango
, pipewire , pipewire
, snappy
, udev , udev
, wayland , wayland
, xdg-utils
, xorg , xorg
, zlib , zlib
, xdg-utils
, snappy
# command line arguments which are always set e.g "--disable-gpu" # command line arguments which are always set e.g "--disable-gpu"
, commandLineArgs ? "" , commandLineArgs ? ""
@ -73,7 +74,7 @@ let
libxkbcommon libXScrnSaver libXcomposite libXcursor libXdamage libxkbcommon libXScrnSaver libXcomposite libXcursor libXdamage
libXext libXfixes libXi libXrandr libXrender libxshmfence libXext libXfixes libXi libXrandr libXrender libxshmfence
libXtst libuuid mesa nspr nss pango pipewire udev wayland libXtst libuuid mesa nspr nss pango pipewire udev wayland
xorg.libxcb zlib snappy xorg.libxcb zlib snappy libkrb5
] ]
++ optional pulseSupport libpulseaudio ++ optional pulseSupport libpulseaudio
++ optional libvaSupport libva; ++ optional libvaSupport libva;

View file

@ -1,4 +1,4 @@
{ lib, perl, buildEnv, makeWrapper { lib, perl, buildEnv, makeBinaryWrapper
, extraLibs ? [] , extraLibs ? []
, extraOutputsToInstall ? [] , extraOutputsToInstall ? []
, postBuild ? "" , postBuild ? ""
@ -17,7 +17,7 @@ let
inherit ignoreCollisions; inherit ignoreCollisions;
extraOutputsToInstall = [ "out" ] ++ extraOutputsToInstall; extraOutputsToInstall = [ "out" ] ++ extraOutputsToInstall;
nativeBuildInputs = [ makeWrapper ]; nativeBuildInputs = [ makeBinaryWrapper ];
# we create wrapper for the binaries in the different packages # we create wrapper for the binaries in the different packages
postBuild = '' postBuild = ''

View file

@ -5,11 +5,10 @@
, testscenarios , testscenarios
}: }:
buildPythonPackage rec { buildPythonPackage {
pname = "cliff"; pname = "cliff";
inherit (cliff) version; inherit (cliff) version src;
format = "other";
src = cliff.src;
postPatch = '' postPatch = ''
# only a small portion of the listed packages are actually needed for running the tests # only a small portion of the listed packages are actually needed for running the tests

View file

@ -3,11 +3,10 @@
, stestr , stestr
}: }:
buildPythonPackage rec { buildPythonPackage {
pname = "debtcollector-tests"; pname = "debtcollector-tests";
inherit (debtcollector) version; inherit (debtcollector) version src;
format = "other";
src = debtcollector.src;
postPatch = '' postPatch = ''
# only a small portion of the listed packages are actually needed for running the tests # only a small portion of the listed packages are actually needed for running the tests

View file

@ -1,5 +1,4 @@
{ stdenv { buildPythonPackage
, buildPythonPackage
, dm-haiku , dm-haiku
, chex , chex
, cloudpickle , cloudpickle
@ -16,9 +15,10 @@
, rlax , rlax
, distrax , distrax
, tensorflow-probability , tensorflow-probability
, optax }: , optax
}:
buildPythonPackage rec { buildPythonPackage {
pname = "dm-haiku-tests"; pname = "dm-haiku-tests";
inherit (dm-haiku) version; inherit (dm-haiku) version;

View file

@ -5,7 +5,7 @@
, testpath , testpath
}: }:
buildPythonPackage rec { buildPythonPackage {
pname = "flit-core"; pname = "flit-core";
inherit (flit-core) version; inherit (flit-core) version;

View file

@ -10,11 +10,10 @@
}: }:
buildPythonPackage rec { buildPythonPackage {
pname = "ipykernel-tests"; pname = "ipykernel-tests";
inherit (ipykernel) version; inherit (ipykernel) version src;
format = "other";
src = ipykernel.src;
dontBuild = true; dontBuild = true;
dontInstall = true; dontInstall = true;

View file

@ -15,11 +15,9 @@
buildPythonPackage { buildPythonPackage {
pname = "openstacksdk-tests"; pname = "openstacksdk-tests";
inherit (openstacksdk) version; inherit (openstacksdk) version src;
format = "other"; format = "other";
src = openstacksdk.src;
dontBuild = true; dontBuild = true;
dontInstall = true; dontInstall = true;

View file

@ -1,5 +1,4 @@
{ stdenv { buildPythonPackage
, buildPythonPackage
, dm-haiku , dm-haiku
, pytest-xdist , pytest-xdist
, pytestCheckHook , pytestCheckHook
@ -9,7 +8,7 @@
, optax , optax
}: }:
buildPythonPackage rec { buildPythonPackage {
pname = "optax-tests"; pname = "optax-tests";
inherit (optax) version; inherit (optax) version;
@ -31,5 +30,4 @@ buildPythonPackage rec {
# See https://github.com/deepmind/optax/issues/323 # See https://github.com/deepmind/optax/issues/323
"examples/lookahead_mnist_test.py" "examples/lookahead_mnist_test.py"
]; ];
} }

View file

@ -7,11 +7,10 @@
, testscenarios , testscenarios
}: }:
buildPythonPackage rec { buildPythonPackage {
pname = "os-service-types-tests"; pname = "os-service-types-tests";
inherit (os-service-types) version; inherit (os-service-types) version src;
format = "other";
src = os-service-types.src;
postPatch = '' postPatch = ''
# only a small portion of the listed packages are actually needed for running the tests # only a small portion of the listed packages are actually needed for running the tests

View file

@ -9,11 +9,10 @@
, testscenarios , testscenarios
}: }:
buildPythonPackage rec { buildPythonPackage {
pname = "oslo-config-tests"; pname = "oslo-config-tests";
inherit (oslo-config) version; inherit (oslo-config) version src;
format = "other";
src = oslo-config.src;
postPatch = '' postPatch = ''
# only a small portion of the listed packages are actually needed for running the tests # only a small portion of the listed packages are actually needed for running the tests

View file

@ -4,11 +4,10 @@
, stestr , stestr
}: }:
buildPythonPackage rec { buildPythonPackage {
pname = "oslotest-tests"; pname = "oslotest-tests";
inherit (oslotest) version; inherit (oslotest) version src;
format = "other";
src = oslotest.src;
postPatch = '' postPatch = ''
# only a small portion of the listed packages are actually needed for running the tests # only a small portion of the listed packages are actually needed for running the tests

View file

@ -10,11 +10,10 @@
, virtualenv , virtualenv
}: }:
buildPythonPackage rec { buildPythonPackage {
pname = "pbr"; pname = "pbr";
inherit (pbr) version; inherit (pbr) version src;
format = "other";
src = pbr.src;
postPatch = '' postPatch = ''
# only a small portion of the listed packages are actually needed for running the tests # only a small portion of the listed packages are actually needed for running the tests

View file

@ -0,0 +1,37 @@
{ lib
, buildPythonPackage
, pythonOlder
, fetchPypi
# build inputs
, typing-extensions
, typing-inspect
}:
let
pname = "pyre-extensions";
version = "0.0.30";
in
buildPythonPackage {
inherit pname version;
format = "setuptools";
disable = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
hash = "sha256-unkjxIbgia+zehBiOo9K6C1zz/QkJtcRxIrwcOW8MbI=";
};
propagatedBuildInputs = [
typing-extensions
typing-inspect
];
pythonImportsCheck = [ "pyre_extensions" ];
meta = with lib; {
description = "This module defines extensions to the standard typing module that are supported by the Pyre typechecker";
homepage = "https://pypi.org/project/pyre-extensions";
license = licenses.mit;
maintainers = with maintainers; [ happysalada ];
};
}

View file

@ -6,7 +6,7 @@
, pytestCheckHook , pytestCheckHook
}: }:
buildPythonPackage rec { buildPythonPackage {
pname = "pytest-asyncio-tests"; pname = "pytest-asyncio-tests";
inherit (pytest-asyncio) version; inherit (pytest-asyncio) version;

View file

@ -22,12 +22,12 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "python-manilaclient"; pname = "python-manilaclient";
version = "4.4.0"; version = "4.5.0";
format = "setuptools"; format = "setuptools";
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
hash = "sha256-iKBbR4h9J9OiQMHjUHxUVk+NbCRUYmIPtWxRwVVGQtY="; hash = "sha256-voeJkwe/7nta2B19+Y5d27XTkhQ/nbWt6MXOicYQZnU=";
}; };
nativeBuildInputs = [ nativeBuildInputs = [

View file

@ -7,11 +7,10 @@
, python-openstackclient , python-openstackclient
}: }:
buildPythonPackage rec { buildPythonPackage {
pname = "python-manilaclient-tests"; pname = "python-manilaclient-tests";
inherit (python-manilaclient) version; inherit (python-manilaclient) version src;
format = "other";
src = python-manilaclient.src;
dontBuild = true; dontBuild = true;
dontInstall = true; dontInstall = true;

View file

@ -0,0 +1,40 @@
{ lib
, buildPythonPackage
, fetchPypi
, python-dateutil
, attrs
, anyio
}:
buildPythonPackage rec {
pname = "semaphore-bot";
version = "0.16.0";
format = "setuptools";
src = fetchPypi {
inherit version pname;
hash = "sha256-EOUvzW4a8CgyQSxb2fXnIWfOYs5Xe0v794vDIruSHmI=";
};
postPatch = ''
substituteInPlace setup.py --replace "anyio>=3.5.0,<=3.6.2" "anyio"
'';
propagatedBuildInputs = [
anyio
attrs
python-dateutil
];
# Upstream has no tests
doCheck = false;
pythonImportsCheck = [ "semaphore" ];
meta = with lib; {
description = "Simple rule-based bot library for Signal Private Messenger";
homepage = "https://github.com/lwesterhof/semaphore";
license = with licenses; [ agpl3Plus ];
maintainers = with maintainers; [ onny ];
};
}

View file

@ -7,13 +7,11 @@
, virtualenv , virtualenv
}: }:
buildPythonPackage rec { buildPythonPackage {
pname = "setuptools-scm-tests"; pname = "setuptools-scm-tests";
inherit (setuptools-scm) version; inherit (setuptools-scm) version src;
format = "other"; format = "other";
src = setuptools-scm.src;
dontBuild = true; dontBuild = true;
dontInstall = true; dontInstall = true;

View file

@ -2,11 +2,10 @@
, stestr , stestr
}: }:
buildPythonPackage rec { buildPythonPackage {
pname = "stestr-tests"; pname = "stestr-tests";
inherit (stestr) version; inherit (stestr) version src;
format = "other";
src = stestr.src;
postPatch = '' postPatch = ''
# only a small portion of the listed packages are actually needed for running the tests # only a small portion of the listed packages are actually needed for running the tests

View file

@ -12,10 +12,9 @@
, wsproto , wsproto
}: }:
buildPythonPackage rec { buildPythonPackage {
pname = "uvicorn-tests"; pname = "uvicorn-tests";
inherit (uvicorn) version; inherit (uvicorn) version;
format = "other"; format = "other";
src = uvicorn.testsout; src = uvicorn.testsout;

View file

@ -6,7 +6,7 @@
, wasmer-compiler-singlepass , wasmer-compiler-singlepass
}: }:
buildPythonPackage rec { buildPythonPackage {
pname = "wasmer-tests"; pname = "wasmer-tests";
inherit (wasmer) version; inherit (wasmer) version;

View file

@ -0,0 +1,85 @@
{ lib
, buildPythonPackage
, pythonOlder
, fetchFromGitHub
, pythonRelaxDepsHook
, which
# runtime dependencies
, numpy
, torch
, pyre-extensions
# check dependencies
, pytestCheckHook
, pytest-cov
# , pytest-mpi
, pytest-timeout
# , pytorch-image-models
, hydra-core
, fairscale
, scipy
, cmake
, openai-triton
, networkx
}:
let
version = "0.0.20";
in
buildPythonPackage {
pname = "xformers";
inherit version;
format = "setuptools";
disable = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "facebookresearch";
repo = "xformers";
rev = "v${version}";
hash = "sha256-OFH4I3eTKw1bQEKHh1AvkpcoShKK5R5674AoJ/mY85I=";
fetchSubmodules = true;
};
preBuild = ''
cat << EOF > ./xformers/version.py
# noqa: C801
__version__ = "${version}"
EOF
'';
nativeBuildInputs = [
pythonRelaxDepsHook
which
];
pythonRelaxDeps = [
"pyre-extensions"
];
propagatedBuildInputs = [
numpy
torch
pyre-extensions
];
pythonImportsCheck = [ "xformers" ];
nativeCheckInputs = [
pytestCheckHook
pytest-cov
pytest-timeout
hydra-core
fairscale
scipy
cmake
networkx
openai-triton
];
meta = with lib; {
description = "XFormers: A collection of composable Transformer building blocks";
homepage = "https://github.com/facebookresearch/xformers";
changelog = "https://github.com/facebookresearch/xformers/blob/${version}/CHANGELOG.md";
license = licenses.bsd3;
maintainers = with maintainers; [ happysalada ];
};
}

View file

@ -4,11 +4,11 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "jenkins"; pname = "jenkins";
version = "2.401.1"; version = "2.401.2";
src = fetchurl { src = fetchurl {
url = "https://get.jenkins.io/war-stable/${version}/jenkins.war"; url = "https://get.jenkins.io/war-stable/${version}/jenkins.war";
hash = "sha256-YAtz6r95eFLjmRlUG4T3aG/2Abl8d7ROsAhD65HH3Ww="; hash = "sha256-hr2OCytRB1yZsA1DYDwoWEQL8BHs0Imlx5HQyWTUBoI=";
}; };
nativeBuildInputs = [ makeWrapper ]; nativeBuildInputs = [ makeWrapper ];

View file

@ -12,7 +12,7 @@
}: }:
stdenvNoCC.mkDerivation rec { stdenvNoCC.mkDerivation rec {
version = "0.6.13"; version = "0.6.14";
pname = "bun"; pname = "bun";
src = passthru.sources.${stdenvNoCC.hostPlatform.system} or (throw "Unsupported system: ${stdenvNoCC.hostPlatform.system}"); src = passthru.sources.${stdenvNoCC.hostPlatform.system} or (throw "Unsupported system: ${stdenvNoCC.hostPlatform.system}");
@ -33,19 +33,19 @@ stdenvNoCC.mkDerivation rec {
sources = { sources = {
"aarch64-darwin" = fetchurl { "aarch64-darwin" = fetchurl {
url = "https://github.com/oven-sh/bun/releases/download/bun-v${version}/bun-darwin-aarch64.zip"; url = "https://github.com/oven-sh/bun/releases/download/bun-v${version}/bun-darwin-aarch64.zip";
sha256 = "6d4pDuAJCgUIFpmp8gGLn2rHvpQ54I6vCXU2WmIYe0M="; sha256 = "adXsZjg2dmUzaKTBARfS195y3eTUgiOep5pr6y36c6g=";
}; };
"aarch64-linux" = fetchurl { "aarch64-linux" = fetchurl {
url = "https://github.com/oven-sh/bun/releases/download/bun-v${version}/bun-linux-aarch64.zip"; url = "https://github.com/oven-sh/bun/releases/download/bun-v${version}/bun-linux-aarch64.zip";
sha256 = "Hr3c0840fz47jDNjigTsz7HEUSP6btXVDFUUtDtdO5I="; sha256 = "IHGYARyeRHN3vORW/fBX7+j3vpfQX+ZQWX2TcIOrMHc=";
}; };
"x86_64-darwin" = fetchurl { "x86_64-darwin" = fetchurl {
url = "https://github.com/oven-sh/bun/releases/download/bun-v${version}/bun-darwin-x64.zip"; url = "https://github.com/oven-sh/bun/releases/download/bun-v${version}/bun-darwin-x64.zip";
sha256 = "H7pjr6ySoxYOGrOpLjzMb/b3BiG50XSmMi6atQooRN4="; sha256 = "uESJFXTVXpK2HPUszU0l5Jgnvz28toBP/0DgVFvqYGY=";
}; };
"x86_64-linux" = fetchurl { "x86_64-linux" = fetchurl {
url = "https://github.com/oven-sh/bun/releases/download/bun-v${version}/bun-linux-x64.zip"; url = "https://github.com/oven-sh/bun/releases/download/bun-v${version}/bun-linux-x64.zip";
sha256 = "f3VysZdTfs4G4a48AahbaEACVpiKPG7OfbAYTCGHi1k="; sha256 = "5iU+1FevTjjzo/qN0zjIoCQflbWCmdfMXkx+6BOEEcc=";
}; };
}; };
updateScript = writeShellScript "update-bun" '' updateScript = writeShellScript "update-bun" ''

View file

@ -11,11 +11,11 @@ let
in in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "grails"; pname = "grails";
version = "5.3.2"; version = "5.3.3";
src = fetchurl { src = fetchurl {
url = "https://github.com/grails/grails-core/releases/download/v${version}/grails-${version}.zip"; url = "https://github.com/grails/grails-core/releases/download/v${version}/grails-${version}.zip";
sha256 = "sha256-UdRtrQiHbBc8VoVUulDCZmAfZ1YTVdgNfeF91HomSqc="; sha256 = "sha256-uNp6jQAlSOQlZ26PBYofBWANhKEnkYN+PTOSy8bQQ/o=";
}; };
nativeBuildInputs = [ unzip ]; nativeBuildInputs = [ unzip ];

View file

@ -2,18 +2,18 @@
buildGoModule rec { buildGoModule rec {
pname = "dolt"; pname = "dolt";
version = "1.7.4"; version = "1.7.5";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "dolthub"; owner = "dolthub";
repo = "dolt"; repo = "dolt";
rev = "v${version}"; rev = "v${version}";
sha256 = "sha256-6rjcoruv+egIDL3kZPIVEMpigDV1j5jjRer3bDvCjjU="; sha256 = "sha256-nAcwH4RVvRPZfPnXyPDOO5GFpUxIBmJzl3QH+5G6jcY=";
}; };
modRoot = "./go"; modRoot = "./go";
subPackages = [ "cmd/dolt" ]; subPackages = [ "cmd/dolt" ];
vendorHash = "sha256-lYf3ARw2TX9dfX2z8W3OY7h+AqocfSdYcGgjvf8h5Bc="; vendorHash = "sha256-ODOAxH73AflCp9tLeYMU46bqr3MAS1casuGAFWuLYjA=";
proxyVendor = true; proxyVendor = true;
doCheck = false; doCheck = false;

View file

@ -110,4 +110,14 @@ let
in { in {
gcc = (lib.mapAttrs (_: mapMultiPlatformTest (system: system // {useLLVM = false;})) tests); gcc = (lib.mapAttrs (_: mapMultiPlatformTest (system: system // {useLLVM = false;})) tests);
llvm = (lib.mapAttrs (_: mapMultiPlatformTest (system: system // {useLLVM = true;})) tests); llvm = (lib.mapAttrs (_: mapMultiPlatformTest (system: system // {useLLVM = true;})) tests);
# see https://github.com/NixOS/nixpkgs/issues/213453
# this is a good test of a lot of tricky glibc/libgcc corner cases
mbuffer = let
mbuffer = pkgs.pkgsCross.aarch64-multiplatform.mbuffer;
emulator = with lib.systems; (elaborate examples.aarch64-multiplatform).emulator pkgs;
in
pkgs.runCommand "test-mbuffer" {} ''
echo hello | ${emulator} ${mbuffer}/bin/mbuffer
'';
} }

View file

@ -1,39 +1,25 @@
{ lib, stdenv, fetchFromGitHub, fuse }: { lib, stdenv, fetchFromGitHub, pkg-config, fuse, gitUpdater }:
stdenv.mkDerivation { stdenv.mkDerivation rec {
pname = "9pfs"; pname = "9pfs";
version = "unstable-2015-09-18"; version = "0.3";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "mischief"; owner = "ftrvxmtrx";
repo = "9pfs"; repo = "9pfs";
rev = "7f4ca4cd750d650c1215b92ac3cc2a28041960e4"; rev = version;
sha256 = "007s2idsn6bspmfxv1qabj39ggkgvn6gwdbhczwn04lb4c6gh3xc"; sha256 = "sha256-ywWG/H2ilt36mjlDSgIzYpardCFXpmbLiml6wy47XuA=";
}; };
# Upstream development has stopped and is no longer accepting patches makeFlags = [ "BIN=$(out)/bin" "MAN=$(out)/share/man/man1" ];
# https://github.com/mischief/9pfs/pull/3 nativeBuildInputs = [ pkg-config ];
patches = [ ./fix-darwin-build.patch ];
preConfigure =
''
substituteInPlace Makefile --replace '-g bin' ""
installFlagsArray+=(BIN=$out/bin MAN=$out/share/man/man1)
mkdir -p $out/bin $out/share/man/man1
'';
buildInputs = [ fuse ]; buildInputs = [ fuse ];
# Workaround build failure on -fno-common toolchains like upstream
# gcc-10. Otherwise build fails as:
# ld: lib/auth_rpc.o:/build/source/lib/../9pfs.h:35: multiple definition of
# `logfile'; 9pfs.o:/build/source/9pfs.h:35: first defined here
env.NIX_CFLAGS_COMPILE = "-fcommon";
enableParallelBuilding = true; enableParallelBuilding = true;
passthru.updateScript = gitUpdater { };
meta = { meta = {
homepage = "https://github.com/mischief/9pfs"; homepage = "https://github.com/ftrvxmtrx/9pfs";
description = "FUSE-based client of the 9P network filesystem protocol"; description = "FUSE-based client of the 9P network filesystem protocol";
maintainers = [ lib.maintainers.eelco ]; maintainers = [ lib.maintainers.eelco ];
platforms = lib.platforms.unix; platforms = lib.platforms.unix;

View file

@ -1,47 +0,0 @@
From 6b7863b51c97f8ecd9a93fc4347f8938f9b5c05f Mon Sep 17 00:00:00 2001
From: midchildan <git@midchildan.org>
Date: Tue, 30 Mar 2021 22:21:51 +0900
Subject: [PATCH] build: fix build for macOS
---
9pfs.c | 4 ++--
libc.h | 4 ++++
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/9pfs.c b/9pfs.c
index 2c481bd..f5c487c 100644
--- a/9pfs.c
+++ b/9pfs.c
@@ -30,7 +30,7 @@
enum
{
CACHECTLSIZE = 8, /* sizeof("cleared\n") - 1 */
- MSIZE = 8192
+ MSIZE_9P = 8192
};
void dir2stat(struct stat*, Dir*);
@@ -505,7 +505,7 @@ main(int argc, char *argv[])
freeaddrinfo(ainfo);
init9p();
- msize = _9pversion(MSIZE);
+ msize = _9pversion(MSIZE_9P);
if(doauth){
authfid = _9pauth(AUTHFID, user, NULL);
ai = auth_proxy(authfid, auth_getkey, "proto=p9any role=client");
diff --git a/libc.h b/libc.h
index 099adba..aac03c5 100644
--- a/libc.h
+++ b/libc.h
@@ -61,6 +61,10 @@ typedef unsigned char uchar;
typedef unsigned long long uvlong;
typedef long long vlong;
+#ifndef __GLIBC__
+typedef unsigned long ulong;
+#endif
+
typedef
struct Qid
{

View file

@ -7961,6 +7961,8 @@ self: super: with self; {
pyrdfa3 = callPackage ../development/python-modules/pyrdfa3 { }; pyrdfa3 = callPackage ../development/python-modules/pyrdfa3 { };
pyre-extensions = callPackage ../development/python-modules/pyre-extensions { };
pyrevolve = callPackage ../development/python-modules/pyrevolve { }; pyrevolve = callPackage ../development/python-modules/pyrevolve { };
pyrfxtrx = callPackage ../development/python-modules/pyrfxtrx { }; pyrfxtrx = callPackage ../development/python-modules/pyrfxtrx { };
@ -11287,6 +11289,8 @@ self: super: with self; {
semantic-version = callPackage ../development/python-modules/semantic-version { }; semantic-version = callPackage ../development/python-modules/semantic-version { };
semaphore-bot = callPackage ../development/python-modules/semaphore-bot { };
semver = callPackage ../development/python-modules/semver { }; semver = callPackage ../development/python-modules/semver { };
send2trash = callPackage ../development/python-modules/send2trash { }; send2trash = callPackage ../development/python-modules/send2trash { };
@ -13483,6 +13487,8 @@ self: super: with self; {
inherit (pkgs) graphviz; inherit (pkgs) graphviz;
}; };
xformers = callPackage ../development/python-modules/xformers { };
xgboost = callPackage ../development/python-modules/xgboost { xgboost = callPackage ../development/python-modules/xgboost {
inherit (pkgs) xgboost; inherit (pkgs) xgboost;
}; };