diff options
Diffstat (limited to 'pkgs/os-specific')
23 files changed, 467 insertions, 78 deletions
diff --git a/pkgs/os-specific/darwin/rewrite-tbd/default.nix b/pkgs/os-specific/darwin/rewrite-tbd/default.nix index 5cf63754dfb..7a5467dc92a 100644 --- a/pkgs/os-specific/darwin/rewrite-tbd/default.nix +++ b/pkgs/os-specific/darwin/rewrite-tbd/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation { pname = "rewrite-tbd"; - version = "20201114"; + version = "unstable-2023-03-27"; src = fetchFromGitHub { owner = "thefloweringash"; repo = "rewrite-tbd"; - rev = "988f29c6ccbca9b883966225263d8d78676da6a3"; - sha256 = "08sk91zwj6n9x2ymwid2k7y0rwv5b7p6h1b25ipx1dv0i43p6v1a"; + rev = "d7852691762635028d237b7d00c3dc6a6613de79"; + hash = "sha256-syxioFiGvEv4Ypk5hlIjLQth5YmdFdr+NC+aXSXzG4k="; }; # Nix takes care of these paths. Avoiding the use of `pkg-config` prevents an infinite recursion. @@ -25,7 +25,7 @@ stdenv.mkDerivation { meta = with lib; { homepage = "https://github.com/thefloweringash/rewrite-tbd/"; description = "Rewrite filepath in .tbd to Nix applicable format"; - platforms = platforms.darwin; + platforms = platforms.unix; license = licenses.mit; }; } diff --git a/pkgs/os-specific/linux/9ptls/default.nix b/pkgs/os-specific/linux/9ptls/default.nix new file mode 100644 index 00000000000..20fa779ecf6 --- /dev/null +++ b/pkgs/os-specific/linux/9ptls/default.nix @@ -0,0 +1,28 @@ +{ lib +, stdenv +, tlsclient +}: + +stdenv.mkDerivation (finalAttrs: { + inherit (tlsclient) src version enableParallelBuilding; + pname = "9ptls"; + + strictDeps = true; + + buildFlags = [ "mount.9ptls" ]; + installFlags = [ "PREFIX=$(out)" "SBIN=$(out)/bin" ]; + installTargets = "mount.9ptls.install"; + + meta = with lib; { + description = "mount.9ptls mount helper"; + longDescription = '' + mount.9ptls wraps the v9fs mount type in a dp9ik authenticated + tls tunnel using tlsclient. + ''; + homepage = "https://git.sr.ht/~moody/tlsclient"; + license = licenses.mit; + maintainers = with maintainers; [ moody ]; + mainProgram = "mount.9ptls"; + platforms = platforms.linux; + }; +}) diff --git a/pkgs/os-specific/linux/hwdata/default.nix b/pkgs/os-specific/linux/hwdata/default.nix index 08b0cd5e5c1..af8cbf0aa82 100644 --- a/pkgs/os-specific/linux/hwdata/default.nix +++ b/pkgs/os-specific/linux/hwdata/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "hwdata"; - version = "0.371"; + version = "0.372"; src = fetchFromGitHub { owner = "vcrhonek"; repo = "hwdata"; rev = "v${version}"; - sha256 = "sha256-bK61nvuzm8LTotVSBtGyBMELZPqoENkPM4NKtgEx9qw="; + hash = "sha256-XC0U5UsOjTveRj1b0e1TBlYv/tKebSOu/YEGt/rmAHw="; }; postPatch = '' diff --git a/pkgs/os-specific/linux/kernel/htmldocs.nix b/pkgs/os-specific/linux/kernel/htmldocs.nix index ef2abefb377..ba641347c83 100644 --- a/pkgs/os-specific/linux/kernel/htmldocs.nix +++ b/pkgs/os-specific/linux/kernel/htmldocs.nix @@ -51,6 +51,6 @@ stdenv.mkDerivation { homepage = "https://www.kernel.org/doc/htmldocs/"; platforms = platforms.linux; inherit (linux_latest.meta) license; - maintainers = with maintainers; [ SuperSandro2000 ]; + maintainers = with maintainers; [ ]; }; } diff --git a/pkgs/os-specific/linux/kernel/linux-5.15.nix b/pkgs/os-specific/linux/kernel/linux-5.15.nix index 2d0caf16131..3bf19de2833 100644 --- a/pkgs/os-specific/linux/kernel/linux-5.15.nix +++ b/pkgs/os-specific/linux/kernel/linux-5.15.nix @@ -3,7 +3,7 @@ with lib; buildLinux (args // rec { - version = "5.15.120"; + version = "5.15.121"; # modDirVersion needs to be x.y.z, will automatically add .0 if needed modDirVersion = versions.pad 3 version; @@ -13,6 +13,6 @@ buildLinux (args // rec { src = fetchurl { url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz"; - sha256 = "1xl3nrykbxdwv5a9rk0xnb7l61dsyjvkm1ryrdii09vbmsg0i6b4"; + sha256 = "07f3a68r1yb4p19z1azjwp2vhjb3ayh31hz9hfb4a98dn2ywxq07"; }; } // (args.argsOverride or { })) diff --git a/pkgs/os-specific/linux/kernel/linux-6.1.nix b/pkgs/os-specific/linux/kernel/linux-6.1.nix index b52a2798fcc..c8ecfc95f35 100644 --- a/pkgs/os-specific/linux/kernel/linux-6.1.nix +++ b/pkgs/os-specific/linux/kernel/linux-6.1.nix @@ -3,7 +3,7 @@ with lib; buildLinux (args // rec { - version = "6.1.39"; + version = "6.1.40"; # modDirVersion needs to be x.y.z, will automatically add .0 if needed modDirVersion = versions.pad 3 version; @@ -13,6 +13,6 @@ buildLinux (args // rec { src = fetchurl { url = "mirror://kernel/linux/kernel/v6.x/linux-${version}.tar.xz"; - sha256 = "1f45j3ch1ljbacjlg8q45iva9lvwys938rdg0s516mznzlifxpac"; + sha256 = "1w474pia4pxz4qbfai27ary1y1h2fnn7kvx7yz7wszd0jwhzrsj3"; }; } // (args.argsOverride or { })) diff --git a/pkgs/os-specific/linux/kernel/linux-6.4.nix b/pkgs/os-specific/linux/kernel/linux-6.4.nix index 189f4da7eca..b87269589ae 100644 --- a/pkgs/os-specific/linux/kernel/linux-6.4.nix +++ b/pkgs/os-specific/linux/kernel/linux-6.4.nix @@ -3,7 +3,7 @@ with lib; buildLinux (args // rec { - version = "6.4.4"; + version = "6.4.5"; # modDirVersion needs to be x.y.z, will automatically add .0 if needed modDirVersion = versions.pad 3 version; @@ -13,6 +13,6 @@ buildLinux (args // rec { src = fetchurl { url = "mirror://kernel/linux/kernel/v6.x/linux-${version}.tar.xz"; - sha256 = "0apzfnn04w6jda9yw5cbgj8784frvqrryb1iw5ad390lwwmlmg4w"; + sha256 = "1dz9inr1bf7jx5s9n0dfa0srfzrwnz1zmdq42bbxyl9w8q3jqkip"; }; } // (args.argsOverride or { })) diff --git a/pkgs/os-specific/linux/kernel/xanmod-kernels.nix b/pkgs/os-specific/linux/kernel/xanmod-kernels.nix index 3fbdcd2171f..4781f5f14e5 100644 --- a/pkgs/os-specific/linux/kernel/xanmod-kernels.nix +++ b/pkgs/os-specific/linux/kernel/xanmod-kernels.nix @@ -3,14 +3,14 @@ let # These names are how they are designated in https://xanmod.org. ltsVariant = { - version = "6.1.37"; - hash = "sha256-g8cmAhsM03jBu7UZoNOLBX7cGg8rz70/xhF7sJj9nCY="; + version = "6.1.39"; + hash = "sha256-H7KoNTl00OCQhUZXNM6PfiknI+lOVNxe2+levmJM5gA="; variant = "lts"; }; mainVariant = { - version = "6.4.1"; - hash = "sha256-WPnINDkOj0IoUDLBG/2LOrppVi9o9XSSgMrs/NBbqdA="; + version = "6.4.4"; + hash = "sha256-EdyGAdWIPr91SNz68tVhya9YO4/dL/wEmEklo45i2p0="; variant = "main"; }; diff --git a/pkgs/os-specific/linux/libbpf/default.nix b/pkgs/os-specific/linux/libbpf/default.nix index be1a1453e87..51f6ea471a6 100644 --- a/pkgs/os-specific/linux/libbpf/default.nix +++ b/pkgs/os-specific/linux/libbpf/default.nix @@ -9,13 +9,13 @@ stdenv.mkDerivation rec { pname = "libbpf"; - version = "1.2.0"; + version = "1.2.2"; src = fetchFromGitHub { owner = "libbpf"; repo = "libbpf"; rev = "v${version}"; - sha256 = "sha256-NimK4pdYcai21hZHdP1mBX1MOlNY61iDJ+PDYwpRuVE="; + sha256 = "sha256-SDDdz2HKEfzHloLkb0sv5ldTo+1yJDVc9O7nj4Cjznk="; }; nativeBuildInputs = [ pkg-config ]; diff --git a/pkgs/os-specific/linux/minimal-bootstrap/bash/default.nix b/pkgs/os-specific/linux/minimal-bootstrap/bash/default.nix new file mode 100644 index 00000000000..9c9682fdf9d --- /dev/null +++ b/pkgs/os-specific/linux/minimal-bootstrap/bash/default.nix @@ -0,0 +1,98 @@ +{ lib +, buildPlatform +, hostPlatform +, fetchurl +, bootBash +, gnumake +, gnused +, gnugrep +, gnutar +, gawk +, gzip +, gcc +, glibc +, binutils +, linux-headers +, derivationWithMeta +, bash +, coreutils +}: +let + pname = "bash"; + version = "5.2.15"; + + src = fetchurl { + url = "mirror://gnu/bash/bash-${version}.tar.gz"; + sha256 = "132qng0jy600mv1fs95ylnlisx2wavkkgpb19c6kmz7lnmjhjwhk"; + }; +in +bootBash.runCommand "${pname}-${version}" { + inherit pname version; + + nativeBuildInputs = [ + gcc + binutils + gnumake + gnused + gnugrep + gnutar + gawk + gzip + ]; + + passthru.runCommand = name: env: buildCommand: + derivationWithMeta ({ + inherit name buildCommand; + builder = "${bash}/bin/bash"; + args = [ + "-e" + (builtins.toFile "bash-builder.sh" '' + export CONFIG_SHELL=$SHELL + bash -eux $buildCommandPath + '') + ]; + passAsFile = [ "buildCommand" ]; + + SHELL = "${bash}/bin/bash"; + PATH = lib.makeBinPath ((env.nativeBuildInputs or []) ++ [ + bash + coreutils + ]); + } // (builtins.removeAttrs env [ "nativeBuildInputs" ])); + + passthru.tests.get-version = result: + bootBash.runCommand "${pname}-get-version-${version}" {} '' + ${result}/bin/bash --version + mkdir $out + ''; + + meta = with lib; { + description = "GNU Bourne-Again Shell, the de facto standard shell on Linux"; + homepage = "https://www.gnu.org/software/bash"; + license = licenses.gpl3Plus; + maintainers = teams.minimal-bootstrap.members; + platforms = platforms.unix; + }; +} '' + # Unpack + tar xzf ${src} + cd bash-${version} + + # Configure + export CC="gcc -I${glibc}/include -I${linux-headers}/include" + export LIBRARY_PATH="${glibc}/lib" + export LIBS="-lc -lnss_files -lnss_dns -lresolv" + export ac_cv_func_dlopen=no + bash ./configure \ + --prefix=$out \ + --build=${buildPlatform.config} \ + --host=${hostPlatform.config} \ + --disable-nls \ + --disable-net-redirections + + # Build + make SHELL=bash + + # Install + make install +'' diff --git a/pkgs/os-specific/linux/minimal-bootstrap/default.nix b/pkgs/os-specific/linux/minimal-bootstrap/default.nix index 45175b987ca..1c286e73aa1 100644 --- a/pkgs/os-specific/linux/minimal-bootstrap/default.nix +++ b/pkgs/os-specific/linux/minimal-bootstrap/default.nix @@ -15,6 +15,12 @@ lib.makeScope bash_2_05 = callPackage ./bash/2.nix { tinycc = tinycc-mes; }; + bash = callPackage ./bash { + bootBash = bash_2_05; + gcc = gcc2; + glibc = glibc22; + }; + binutils = callPackage ./binutils { bash = bash_2_05; gcc = gcc2; @@ -36,9 +42,16 @@ lib.makeScope coreutils = callPackage ./coreutils { tinycc = tinycc-mes; }; + diffutils = callPackage ./diffutils { + bash = bash_2_05; + gcc = gcc2; + glibc = glibc22; + }; + gawk = callPackage ./gawk { bash = bash_2_05; tinycc = tinycc-mes; + gnused = gnused-mes; }; gcc2 = callPackage ./gcc/2.nix { @@ -56,6 +69,7 @@ lib.makeScope inherit (callPackage ./glibc { bash = bash_2_05; + gnused = gnused-mes; }) glibc22; gnugrep = callPackage ./gnugrep { @@ -69,17 +83,26 @@ lib.makeScope gnused = callPackage ./gnused { bash = bash_2_05; + gcc = gcc2; + glibc = glibc22; + gnused = gnused-mes; + }; + gnused-mes = callPackage ./gnused { + bash = bash_2_05; tinycc = tinycc-mes; + mesBootstrap = true; }; gnutar = callPackage ./gnutar { bash = bash_2_05; tinycc = tinycc-mes; + gnused = gnused-mes; }; gzip = callPackage ./gzip { bash = bash_2_05; tinycc = tinycc-mes; + gnused = gnused-mes; }; heirloom = callPackage ./heirloom { @@ -112,15 +135,18 @@ lib.makeScope inherit (callPackage ./utils.nix { }) derivationWithMeta writeTextFile writeText; test = kaem.runCommand "minimal-bootstrap-test" {} '' + echo ${bash.tests.get-version} echo ${bash_2_05.tests.get-version} echo ${binutils.tests.get-version} echo ${binutils-mes.tests.get-version} echo ${bzip2.tests.get-version} + echo ${diffutils.tests.get-version} echo ${gawk.tests.get-version} echo ${gcc2.tests.get-version} echo ${gcc2-mes.tests.get-version} echo ${gnugrep.tests.get-version} echo ${gnused.tests.get-version} + echo ${gnused-mes.tests.get-version} echo ${gnutar.tests.get-version} echo ${gzip.tests.get-version} echo ${heirloom.tests.get-version} diff --git a/pkgs/os-specific/linux/minimal-bootstrap/diffutils/default.nix b/pkgs/os-specific/linux/minimal-bootstrap/diffutils/default.nix new file mode 100644 index 00000000000..7545a52524a --- /dev/null +++ b/pkgs/os-specific/linux/minimal-bootstrap/diffutils/default.nix @@ -0,0 +1,72 @@ +{ lib +, buildPlatform +, hostPlatform +, fetchurl +, bash +, gcc +, glibc +, binutils +, linux-headers +, gnumake +, gnugrep +, gnused +, gawk +, gnutar +, gzip +}: +let + pname = "diffutils"; + version = "2.8.1"; + + src = fetchurl { + url = "mirror://gnu/diffutils/diffutils-${version}.tar.gz"; + sha256 = "0nizs9r76aiymzasmj1jngl7s71jfzl9xfziigcls8k9n141f065"; + }; +in +bash.runCommand "${pname}-${version}" { + inherit pname version; + + nativeBuildInputs = [ + gcc + binutils + gnumake + gnused + gnugrep + gawk + gnutar + gzip + ]; + + passthru.tests.get-version = result: + bash.runCommand "${pname}-get-version-${version}" {} '' + ${result}/bin/diff --version + mkdir $out + ''; + + meta = with lib; { + description = "Commands for showing the differences between files (diff, cmp, etc.)"; + homepage = "https://www.gnu.org/software/diffutils/diffutils.html"; + license = licenses.gpl3Only; + maintainers = teams.minimal-bootstrap.members; + platforms = platforms.unix; + }; +} '' + # Unpack + tar xzf ${src} + cd diffutils-${version} + + # Configure + export C_INCLUDE_PATH="${glibc}/include:${linux-headers}/include" + export LIBRARY_PATH="${glibc}/lib" + export LIBS="-lc -lnss_files -lnss_dns -lresolv" + bash ./configure \ + --prefix=$out \ + --build=${buildPlatform.config} \ + --host=${hostPlatform.config} + + # Build + make + + # Install + make install +'' diff --git a/pkgs/os-specific/linux/minimal-bootstrap/gcc/2.nix b/pkgs/os-specific/linux/minimal-bootstrap/gcc/2.nix index 0a79c97e75a..c879fd30aaf 100644 --- a/pkgs/os-specific/linux/minimal-bootstrap/gcc/2.nix +++ b/pkgs/os-specific/linux/minimal-bootstrap/gcc/2.nix @@ -131,8 +131,8 @@ bash.runCommand "${pname}-${version}" { ${lib.optionalString mesBootstrap "ar x ${tinycc.libs}/lib/libtcc1.a"} ar r $out/lib/gcc-lib/${hostPlatform.config}/${version}/libgcc.a *.o cd .. + cp gcc/libgcc2.a $out/lib/libgcc2.a ${lib.optionalString mesBootstrap '' - cp gcc/libgcc2.a $out/lib/libgcc2.a ar x ${tinycc.libs}/lib/libtcc1.a ar x ${tinycc.libs}/lib/libc.a ar r $out/lib/gcc-lib/${hostPlatform.config}/${version}/libc.a libc.o libtcc1.o diff --git a/pkgs/os-specific/linux/minimal-bootstrap/gnused/default.nix b/pkgs/os-specific/linux/minimal-bootstrap/gnused/default.nix index b6b1f9f198c..b5647b96ee3 100644 --- a/pkgs/os-specific/linux/minimal-bootstrap/gnused/default.nix +++ b/pkgs/os-specific/linux/minimal-bootstrap/gnused/default.nix @@ -1,11 +1,16 @@ { lib +, buildPlatform +, hostPlatform , fetchurl , bash -, tinycc , gnumake +, mesBootstrap ? false, tinycc ? null +, gcc ? null, glibc ? null, binutils ? null, gnused ? null, linux-headers, gnugrep }: +assert mesBootstrap -> tinycc != null; +assert !mesBootstrap -> gcc != null && glibc != null && binutils != null && gnused != null; let - pname = "gnused"; + pname = "gnused" + lib.optionalString mesBootstrap "-mes"; # last version that can be compiled with mes-libc version = "4.0.9"; @@ -25,8 +30,15 @@ bash.runCommand "${pname}-${version}" { inherit pname version; nativeBuildInputs = [ - tinycc.compiler gnumake + ] ++ lib.optionals mesBootstrap [ + tinycc.compiler + ] ++ lib.optionals (!mesBootstrap) [ + gcc + glibc + binutils + gnused + gnugrep ]; passthru.tests.get-version = result: @@ -43,13 +55,14 @@ bash.runCommand "${pname}-${version}" { mainProgram = "sed"; platforms = platforms.unix; }; -} '' +} ('' # Unpack ungz --file ${src} --output sed.tar untar --file sed.tar rm sed.tar cd sed-${version} +'' + lib.optionalString mesBootstrap '' # Configure cp ${makefile} Makefile catm config.h @@ -59,6 +72,25 @@ bash.runCommand "${pname}-${version}" { CC="tcc -B ${tinycc.libs}/lib" \ LIBC=mes +'' + lib.optionalString (!mesBootstrap) '' + # Configure + export CC="gcc -I${glibc}/include -I${linux-headers}/include" + export LIBRARY_PATH="${glibc}/lib" + export LIBS="-lc -lnss_files -lnss_dns -lresolv" + chmod +x configure + ./configure \ + --build=${buildPlatform.config} \ + --host=${hostPlatform.config} \ + --disable-shared \ + --disable-nls \ + --disable-dependency-tracking \ + --without-included-regex \ + --prefix=$out + + # Build + make + +'' + '' # Install make install PREFIX=$out -'' +'') diff --git a/pkgs/os-specific/linux/nftables/default.nix b/pkgs/os-specific/linux/nftables/default.nix index 26c7b6a9ea3..f91dc84d218 100644 --- a/pkgs/os-specific/linux/nftables/default.nix +++ b/pkgs/os-specific/linux/nftables/default.nix @@ -4,17 +4,18 @@ , gmp, jansson, libedit , autoreconfHook , withDebugSymbols ? false -, withPython ? false , python3 -, withXtables ? true , iptables +, withPython ? false, python3 +, withXtables ? true, iptables +, nixosTests }: stdenv.mkDerivation rec { - version = "1.0.7"; + version = "1.0.8"; pname = "nftables"; src = fetchurl { url = "https://netfilter.org/projects/nftables/files/${pname}-${version}.tar.xz"; - hash = "sha256-wSrJQf/5ra7fFzZ9XOITeJuYoNMUJ3vCKz1x4QiR9BI="; + hash = "sha256-k3N0DeQagtvJiBjgpGoHP664qNBon6T6GnQ5nDK/PVA="; }; nativeBuildInputs = [ @@ -27,7 +28,10 @@ stdenv.mkDerivation rec { libmnl libnftnl libpcap gmp jansson libedit ] ++ lib.optional withXtables iptables - ++ lib.optional withPython python3; + ++ lib.optionals withPython [ + python3 + python3.pkgs.setuptools + ]; configureFlags = [ "--with-json" @@ -37,6 +41,11 @@ stdenv.mkDerivation rec { ++ lib.optional withPython "--enable-python" ++ lib.optional withXtables "--with-xtables"; + passthru.tests = { + inherit (nixosTests) firewall-nftables lxd-nftables; + nat = { inherit (nixosTests.nat.nftables) firewall standalone; }; + }; + meta = with lib; { description = "The project that aims to replace the existing {ip,ip6,arp,eb}tables framework"; homepage = "https://netfilter.org/projects/nftables/"; diff --git a/pkgs/os-specific/linux/pam_dp9ik/default.nix b/pkgs/os-specific/linux/pam_dp9ik/default.nix index 382a3ca7b17..bd097caee49 100644 --- a/pkgs/os-specific/linux/pam_dp9ik/default.nix +++ b/pkgs/os-specific/linux/pam_dp9ik/default.nix @@ -14,10 +14,9 @@ stdenv.mkDerivation { nativeBuildInputs = [ pkg-config ]; buildInputs = [ pam ]; - makeFlags = [ "pam_p9.so" ]; - installPhase = '' - install -Dm755 -t $out/lib/security/ pam_p9.so - ''; + buildFlags = [ "pam_p9.so" ]; + installFlags = [ "PREFIX=$(out)" ]; + installTargets = "pam.install"; meta = with lib; { description = "dp9ik pam module"; diff --git a/pkgs/os-specific/linux/rtl8821au/default.nix b/pkgs/os-specific/linux/rtl8821au/default.nix index 509c2470d8f..b89cddbfc73 100644 --- a/pkgs/os-specific/linux/rtl8821au/default.nix +++ b/pkgs/os-specific/linux/rtl8821au/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation { pname = "rtl8821au"; - version = "${kernel.version}-unstable-2023-07-20"; + version = "${kernel.version}-unstable-2023-07-23"; src = fetchFromGitHub { owner = "morrownr"; repo = "8821au-20210708"; - rev = "072413261b6966b0c666898e69d7d41fb281094f"; - hash = "sha256-yC9knXR+bZwQ4S22zG188b3p3iTzUAFbvSqOFdne7po="; + rev = "0dc022287b0ab534efa885881eaa65c5503291be"; + hash = "sha256-pLRBWdqlv9A39VbCS8dymTCJHcwJooqD8v6mTbOsBz0="; }; nativeBuildInputs = [ bc nukeReferences ] ++ kernel.moduleBuildDependencies; diff --git a/pkgs/os-specific/linux/systemd/default.nix b/pkgs/os-specific/linux/systemd/default.nix index 7378fa82b3e..f14b7acd625 100644 --- a/pkgs/os-specific/linux/systemd/default.nix +++ b/pkgs/os-specific/linux/systemd/default.nix @@ -145,7 +145,7 @@ assert withUkify -> withEfi; let wantCurl = withRemote || withImportd; wantGcrypt = withResolved || withImportd; - version = "253.5"; + version = "253.6"; # Bump this variable on every (major) version change. See below (in the meson options list) for why. # command: @@ -162,7 +162,7 @@ stdenv.mkDerivation (finalAttrs: { owner = "systemd"; repo = "systemd-stable"; rev = "v${version}"; - hash = "sha256-B3A9AvpfZ8SYsiZvHnWO4RHs1/6EdczWF2NmrSqxQ7c="; + hash = "sha256-LZs6QuBe23W643bTuz+MD2pzHiapsBJBHoFXi/QjzG4="; }; # On major changes, or when otherwise required, you *must* reformat the patches, @@ -190,13 +190,6 @@ stdenv.mkDerivation (finalAttrs: { ./0017-core-don-t-taint-on-unmerged-usr.patch ./0018-tpm2_context_init-fix-driver-name-checking.patch ./0019-bootctl-also-print-efi-files-not-owned-by-systemd-in.patch - - # https://github.com/systemd/systemd/pull/28000 - (fetchpatch { - name = "fix-service-exit"; - url = "https://github.com/systemd/systemd/commit/5f7f82ba625ee48d662c1f0286f44b8b0918d05d.patch"; - sha256 = "sha256-pFRXpZjeVl5ZG/mOjHEuMg9zXq4Orwvdp+/LYTbR09I="; - }) ] ++ lib.optional stdenv.hostPlatform.isMusl ( let oe-core = fetchzip { diff --git a/pkgs/os-specific/linux/tp_smapi/default.nix b/pkgs/os-specific/linux/tp_smapi/default.nix index d9b4333d249..d9c5921d465 100644 --- a/pkgs/os-specific/linux/tp_smapi/default.nix +++ b/pkgs/os-specific/linux/tp_smapi/default.nix @@ -1,4 +1,15 @@ -{ stdenv, lib, fetchFromGitHub, kernel, writeScript, coreutils, gnugrep, jq, curl, common-updater-scripts, runtimeShell +{ stdenv +, lib +, fetchFromGitHub +, fetchpatch +, kernel +, writeScript +, coreutils +, gnugrep +, jq +, curl +, common-updater-scripts +, runtimeShell }: stdenv.mkDerivation rec { @@ -6,13 +17,21 @@ stdenv.mkDerivation rec { version = "0.43"; src = fetchFromGitHub { - owner = "evgeni"; + owner = "linux-thinkpad"; repo = "tp_smapi"; rev = "tp-smapi/${version}"; sha256 = "1rjb0njckczc2mj05cagvj0lkyvmyk6bw7wkiinv81lw8m90g77g"; - name = "tp-smapi-${version}"; }; + patches = [ + # update DEFINE_SEMAPHORE usage for linux 6.4+ + # https://github.com/linux-thinkpad/tp_smapi/pull/45 + (fetchpatch { + url = "https://github.com/linux-thinkpad/tp_smapi/commit/0c3398b1acf2a2cabd9cee91dc3fe3d35805fa8b.patch"; + hash = "sha256-J/WvijrpHGwFOZMMxnHdNin5eh8vViTcNb4nwsCqsLs="; + }) + ]; + nativeBuildInputs = kernel.moduleBuildDependencies; hardeningDisable = [ "pic" ]; @@ -39,7 +58,7 @@ stdenv.mkDerivation rec { meta = { description = "IBM ThinkPad hardware functions driver"; - homepage = "https://github.com/evgeni/tp_smapi"; + homepage = "https://github.com/linux-thinkpad/tp_smapi"; license = lib.licenses.gpl2; maintainers = [ ]; # driver is only ment for linux thinkpads i think bellow platforms should cover it. diff --git a/pkgs/os-specific/linux/upower/default.nix b/pkgs/os-specific/linux/upower/default.nix index 9973b1ac5a8..8772c081e03 100644 --- a/pkgs/os-specific/linux/upower/default.nix +++ b/pkgs/os-specific/linux/upower/default.nix @@ -2,6 +2,7 @@ , stdenv , fetchFromGitLab , fetchpatch +, makeWrapper , pkg-config , rsync , libxslt @@ -23,27 +24,31 @@ , useIMobileDevice ? true , libimobiledevice , withDocs ? (stdenv.buildPlatform == stdenv.hostPlatform) +, nixosTests }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "upower"; - version = "1.90.0"; + version = "1.90.2"; - outputs = [ "out" "dev" ] + outputs = [ "out" "dev" "installedTests" ] ++ lib.optionals withDocs [ "devdoc" ]; src = fetchFromGitLab { domain = "gitlab.freedesktop.org"; owner = "upower"; repo = "upower"; - rev = "v${version}"; - hash = "sha256-+C/4dDg6WTLpBgkpNyxjthSdqYdaTLC8vG6jG1LNJ7w="; + rev = "v${finalAttrs.version}"; + hash = "sha256-7WzMAJuf1czU8ZalsEU/NwCXYqTGvcqEqxFt5ocgt48="; }; - # Remove when this is fixed upstream: - # https://gitlab.freedesktop.org/upower/upower/-/issues/214 - patches = lib.optional (stdenv.hostPlatform.system == "i686-linux") - ./i686-test-remove-battery-check.patch; + patches = lib.optionals (stdenv.hostPlatform.system == "i686-linux") [ + # Remove when this is fixed upstream: + # https://gitlab.freedesktop.org/upower/upower/-/issues/214 + ./i686-test-remove-battery-check.patch + ] ++ [ + ./installed-tests-path.patch + ]; strictDeps = true; @@ -60,6 +65,7 @@ stdenv.mkDerivation rec { gettext gobject-introspection libxslt + makeWrapper pkg-config rsync ]; @@ -71,6 +77,14 @@ stdenv.mkDerivation rec { systemd # Duplicate from nativeCheckInputs until https://github.com/NixOS/nixpkgs/issues/161570 is solved umockdev + + # For installed tests. + (python3.withPackages (pp: [ + pp.dbus-python + pp.python-dbusmock + pp.pygobject3 + pp.packaging + ])) ] ++ lib.optionals useIMobileDevice [ libimobiledevice ]; @@ -98,6 +112,7 @@ stdenv.mkDerivation rec { "-Dudevhwdbdir=${placeholder "out"}/lib/udev/hwdb.d" "-Dintrospection=${if (stdenv.buildPlatform == stdenv.hostPlatform) then "auto" else "disabled"}" "-Dgtk-doc=${lib.boolToString withDocs}" + "-Dinstalled_test_prefix=${placeholder "installedTests"}" ]; doCheck = true; @@ -105,6 +120,9 @@ stdenv.mkDerivation rec { postPatch = '' patchShebangs src/linux/integration-test.py patchShebangs src/linux/unittest_inspector.py + + substituteInPlace src/linux/integration-test.py \ + --replace "/usr/share/dbus-1" "$out/share/dbus-1" ''; preCheck = '' @@ -126,35 +144,62 @@ stdenv.mkDerivation rec { runHook postCheck ''; + postCheck = '' + # Undo patchShebangs from postPatch so that it can be replaced with runtime shebang + # unittest_inspector.py intentionally not reverted because it would trigger + # meson rebuild during install and it is not used at runtime anyway. + sed -Ei 's~#!.+/bin/python3~#!/usr/bin/python3~' \ + ../src/linux/integration-test.py + ''; + postInstall = '' # Move stuff from DESTDIR to proper location. # We use rsync to merge the directories. for dir in etc var; do - rsync --archive "${DESTDIR}/$dir" "$out" - rm --recursive "${DESTDIR}/$dir" + rsync --archive "$DESTDIR/$dir" "$out" + rm --recursive "$DESTDIR/$dir" done - for o in out dev; do - rsync --archive "${DESTDIR}/''${!o}" "$(dirname "''${!o}")" - rm --recursive "${DESTDIR}/''${!o}" + for o in out dev installedTests; do + rsync --archive "$DESTDIR/''${!o}" "$(dirname "''${!o}")" + rm --recursive "$DESTDIR/''${!o}" done # Ensure the DESTDIR is removed. - rmdir "${DESTDIR}/nix/store" "${DESTDIR}/nix" "${DESTDIR}" + rmdir "$DESTDIR/nix/store" "$DESTDIR/nix" "$DESTDIR" ''; - # HACK: We want to install configuration files to $out/etc - # but upower should read them from /etc on a NixOS system. - # With autotools, it was possible to override Make variables - # at install time but Meson does not support this - # so we need to convince it to install all files to a temporary - # location using DESTDIR and then move it to proper one in postInstall. - DESTDIR = "${placeholder "out"}/dest"; + postFixup = '' + wrapProgram "$installedTests/libexec/upower/integration-test.py" \ + --prefix GI_TYPELIB_PATH : "${lib.makeSearchPath "lib/girepository-1.0" [ + "$out" + umockdev.out + ]}" \ + --prefix PATH : "${lib.makeBinPath [ + umockdev + ]}" + ''; + + env = { + # HACK: We want to install configuration files to $out/etc + # but upower should read them from /etc on a NixOS system. + # With autotools, it was possible to override Make variables + # at install time but Meson does not support this + # so we need to convince it to install all files to a temporary + # location using DESTDIR and then move it to proper one in postInstall. + DESTDIR = "${placeholder "out"}/dest"; + }; + + passthru = { + tests = { + installedTests = nixosTests.installed-tests.upower; + }; + }; meta = with lib; { homepage = "https://upower.freedesktop.org/"; - changelog = "https://gitlab.freedesktop.org/upower/upower/-/blob/v${version}/NEWS"; + changelog = "https://gitlab.freedesktop.org/upower/upower/-/blob/v${finalAttrs.version}/NEWS"; description = "A D-Bus service for power management"; maintainers = teams.freedesktop.members; platforms = platforms.linux; license = licenses.gpl2Plus; }; -} +}) diff --git a/pkgs/os-specific/linux/upower/installed-tests-path.patch b/pkgs/os-specific/linux/upower/installed-tests-path.patch new file mode 100644 index 00000000000..367f3eab096 --- /dev/null +++ b/pkgs/os-specific/linux/upower/installed-tests-path.patch @@ -0,0 +1,56 @@ +diff --git a/meson_options.txt b/meson_options.txt +index eec3659..f064a1b 100644 +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -6,6 +6,10 @@ option('gtk-doc', + type : 'boolean', + value : 'true', + description : 'Build developer documentation') ++option('installed_test_prefix', ++ type: 'string', ++ value: '', ++ description: 'Prefix for installed tests') + option('introspection', + type : 'feature', + value : 'auto', +diff --git a/src/meson.build b/src/meson.build +index a2352ac..c1f25ac 100644 +--- a/src/meson.build ++++ b/src/meson.build +@@ -85,6 +85,7 @@ install_subdir('does-not-exist', install_dir: historydir, strip_directory : true + + cdata = configuration_data() + cdata.set('libexecdir', get_option('prefix') / get_option('libexecdir')) ++cdata.set('installed_test_bindir', get_option('installed_test_prefix') / 'libexec' / 'upower') + cdata.set('historydir', historydir) + + configure_file( +@@ -147,16 +148,16 @@ if os_backend == 'linux' and gobject_introspection.found() + 'linux/integration-test.py', + 'linux/output_checker.py', + ], +- install_dir: get_option('prefix') / get_option('libexecdir') / 'upower' ++ install_dir: get_option('installed_test_prefix') / 'libexec' / 'upower' + ) + install_subdir('linux/tests/', +- install_dir: get_option('prefix') / get_option('libexecdir') / 'upower' ++ install_dir: get_option('installed_test_prefix') / 'libexec' / 'upower' + ) + + configure_file( + input: 'upower-integration.test.in', + output: 'upower-integration.test', +- install_dir: get_option('datadir') / 'installed-tests' / 'upower', ++ install_dir: get_option('installed_test_prefix') / 'share' / 'installed-tests' / 'upower', + configuration: cdata + ) + endif +diff --git a/src/upower-integration.test.in b/src/upower-integration.test.in +index 151ded0..b0a9bec 100644 +--- a/src/upower-integration.test.in ++++ b/src/upower-integration.test.in +@@ -1,3 +1,3 @@ + [Test] + Type=session +-Exec=@libexecdir@/upower/integration-test.py ++Exec=@installed_test_bindir@/integration-test.py diff --git a/pkgs/os-specific/linux/wooting-udev-rules/default.nix b/pkgs/os-specific/linux/wooting-udev-rules/default.nix index f34e106727c..8231e3e3ea3 100644 --- a/pkgs/os-specific/linux/wooting-udev-rules/default.nix +++ b/pkgs/os-specific/linux/wooting-udev-rules/default.nix @@ -2,9 +2,9 @@ stdenv.mkDerivation rec { pname = "wooting-udev-rules"; - version = "20210525"; + version = "unstable-2023-03-31"; - # Source: https://wooting.helpscoutdocs.com/article/68-wootility-configuring-device-access-for-wootility-under-linux-udev-rules + # Source: https://help.wooting.io/en/article/wootility-configuring-device-access-for-wootility-under-linux-udev-rules-r6lb2o/ src = [ ./wooting.rules ]; dontUnpack = true; @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { ''; meta = with lib; { - homepage = "https://wooting.helpscoutdocs.com/article/34-linux-udev-rules"; + homepage = "https://help.wooting.io/en/article/wootility-configuring-device-access-for-wootility-under-linux-udev-rules-r6lb2o/"; description = "udev rules that give NixOS permission to communicate with Wooting keyboards"; platforms = platforms.linux; license = "unknown"; diff --git a/pkgs/os-specific/linux/wooting-udev-rules/wooting.rules b/pkgs/os-specific/linux/wooting-udev-rules/wooting.rules index a243f68ed13..365627fa1ae 100644 --- a/pkgs/os-specific/linux/wooting-udev-rules/wooting.rules +++ b/pkgs/os-specific/linux/wooting-udev-rules/wooting.rules @@ -20,7 +20,6 @@ SUBSYSTEM=="usb", ATTRS{idVendor}=="31e3", ATTRS{idProduct}=="1101", MODE:="0660 SUBSYSTEM=="hidraw", ATTRS{idVendor}=="31e3", ATTRS{idProduct}=="1102", MODE:="0660", GROUP="input" SUBSYSTEM=="usb", ATTRS{idVendor}=="31e3", ATTRS{idProduct}=="1102", MODE:="0660", GROUP="input" - # Wooting Two SUBSYSTEM=="hidraw", ATTRS{idVendor}=="31e3", ATTRS{idProduct}=="1200", MODE:="0660", GROUP="input" SUBSYSTEM=="usb", ATTRS{idVendor}=="31e3", ATTRS{idProduct}=="1200", MODE:="0660", GROUP="input" @@ -57,6 +56,19 @@ SUBSYSTEM=="usb", ATTRS{idVendor}=="31e3", ATTRS{idProduct}=="1222", MODE:="0660 # Wooting Two HE update mode SUBSYSTEM=="hidraw", ATTRS{idVendor}=="31e3", ATTRS{idProduct}=="122f", MODE:="0660", GROUP="input" +# Wooting Two HE (ARM) +SUBSYSTEM=="hidraw", ATTRS{idVendor}=="31e3", ATTRS{idProduct}=="1230", MODE:="0660", GROUP="input" +SUBSYSTEM=="usb", ATTRS{idVendor}=="31e3", ATTRS{idProduct}=="1230", MODE:="0660", GROUP="input" +# Wooting Two HE Alt-gamepad mode +SUBSYSTEM=="hidraw", ATTRS{idVendor}=="31e3", ATTRS{idProduct}=="1231", MODE:="0660", GROUP="input" +SUBSYSTEM=="usb", ATTRS{idVendor}=="31e3", ATTRS{idProduct}=="1231", MODE:="0660", GROUP="input" +# Wooting Two HE 2nd Alt-gamepad mode +SUBSYSTEM=="hidraw", ATTRS{idVendor}=="31e3", ATTRS{idProduct}=="1232", MODE:="0660", GROUP="input" +SUBSYSTEM=="usb", ATTRS{idVendor}=="31e3", ATTRS{idProduct}=="1232", MODE:="0660", GROUP="input" + +# Wooting Two HE (ARM) update mode +SUBSYSTEM=="hidraw", ATTRS{idVendor}=="31e3", ATTRS{idProduct}=="123f", MODE:="0660", GROUP="input" + # Wooting 60HE SUBSYSTEM=="hidraw", ATTRS{idVendor}=="31e3", ATTRS{idProduct}=="1300", MODE:="0660", GROUP="input" SUBSYSTEM=="usb", ATTRS{idVendor}=="31e3", ATTRS{idProduct}=="1300", MODE:="0660", GROUP="input" |