From 5dfa639d50260d6679db1b8cd6fa870d7b6ac042 Mon Sep 17 00:00:00 2001 From: illustris Date: Thu, 21 Sep 2023 13:01:19 +0530 Subject: [PATCH 01/57] hadoop: 3.3.5 -> 3.3.6, build container executor from source --- .../cluster/hadoop/containerExecutor.nix | 37 ++++++++ .../networking/cluster/hadoop/default.nix | 91 +++++++++++-------- pkgs/top-level/all-packages.nix | 4 +- 3 files changed, 91 insertions(+), 41 deletions(-) create mode 100644 pkgs/applications/networking/cluster/hadoop/containerExecutor.nix diff --git a/pkgs/applications/networking/cluster/hadoop/containerExecutor.nix b/pkgs/applications/networking/cluster/hadoop/containerExecutor.nix new file mode 100644 index 000000000000..69b25784be67 --- /dev/null +++ b/pkgs/applications/networking/cluster/hadoop/containerExecutor.nix @@ -0,0 +1,37 @@ +{ version, hash, stdenv, fetchurl, lib, cmake, openssl, platformAttrs, ... }: + +stdenv.mkDerivation (finalAttrs: { + pname = "hadoop-yarn-containerexecutor"; + inherit version; + + src = fetchurl { + url = with finalAttrs; "mirror://apache/hadoop/common/hadoop-${finalAttrs.version}/hadoop-${finalAttrs.version}-src.tar.gz"; + inherit hash; + }; + sourceRoot = "hadoop-${finalAttrs.version}-src/hadoop-yarn-project/hadoop-yarn/" + +"hadoop-yarn-server/hadoop-yarn-server-nodemanager/src"; + + nativeBuildInputs = [ cmake ]; + buildInputs = [ openssl ]; + cmakeFlags = [ "-DHADOOP_CONF_DIR=/run/wrappers/yarn-nodemanager/etc/hadoop" ]; + + installPhase = '' + mkdir $out + mv target/var/empty/local/bin $out/ + ''; + + meta = with lib; { + homepage = "https://hadoop.apache.org/"; + description = "Framework for distributed processing of large data sets across clusters of computers"; + license = licenses.asl20; + + longDescription = '' + The Hadoop YARN Container Executor is a native component responsible for managing the lifecycle of containers + on individual nodes in a Hadoop YARN cluster. It launches, monitors, and terminates containers, ensuring that + resources like CPU and memory are allocated according to the policies defined in the ResourceManager. + ''; + + maintainers = with maintainers; [ illustris ]; + platforms = attrNames platformAttrs; + }; +}) diff --git a/pkgs/applications/networking/cluster/hadoop/default.nix b/pkgs/applications/networking/cluster/hadoop/default.nix index 65512de2031b..7fb71069c76c 100644 --- a/pkgs/applications/networking/cluster/hadoop/default.nix +++ b/pkgs/applications/networking/cluster/hadoop/default.nix @@ -19,6 +19,8 @@ , nixosTests , sparkSupport ? true , spark +, libtirpc +, callPackage }: with lib; @@ -26,40 +28,49 @@ with lib; assert elem stdenv.system [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ]; let - common = { pname, platformAttrs, untarDir ? "${pname}-${version}", jdk, openssl ? null, nativeLibs ? [ ], libPatches ? "", tests }: - stdenv.mkDerivation rec { - inherit pname jdk libPatches untarDir openssl; + common = { pname, platformAttrs, untarDir ? "${pname}-${version}", jdk, openssl ? null, nativeLibs ? [ ], libPatchesGenerator ? (_: ""), tests }: + stdenv.mkDerivation (finalAttrs: { + inherit pname jdk untarDir openssl; + libPatches = libPatchesGenerator finalAttrs; version = platformAttrs.${stdenv.system}.version or (throw "Unsupported system: ${stdenv.system}"); src = fetchurl { - url = "mirror://apache/hadoop/common/hadoop-${version}/hadoop-${version}" + optionalString stdenv.isAarch64 "-aarch64" + ".tar.gz"; + url = "mirror://apache/hadoop/common/hadoop-${finalAttrs.version}/hadoop-${finalAttrs.version}" + optionalString stdenv.isAarch64 "-aarch64" + ".tar.gz"; inherit (platformAttrs.${stdenv.system}) hash; }; doCheck = true; + # Build the container executor binary from source + containerExecutor = callPackage ./containerExecutor.nix { + inherit (finalAttrs) version; + inherit platformAttrs; + hash = platformAttrs.${stdenv.system}.srcHash; + }; + nativeBuildInputs = [ makeWrapper ] - ++ optionals (stdenv.isLinux && (nativeLibs != [ ] || libPatches != "")) [ autoPatchelfHook ]; + ++ optionals (stdenv.isLinux && (nativeLibs != [ ] || (libPatches finalAttrs) != "")) [ autoPatchelfHook ]; buildInputs = [ openssl ] ++ nativeLibs; installPhase = '' - mkdir -p $out/{lib/${untarDir}/conf,bin,lib} - mv * $out/lib/${untarDir} + mkdir -p $out/{lib/${finalAttrs.untarDir}/conf,bin,lib} + mv * $out/lib/${finalAttrs.untarDir} '' + optionalString stdenv.isLinux '' - # All versions need container-executor, but some versions can't use autoPatchelf because of broken SSL versions - patchelf --set-interpreter ${glibc.out}/lib64/ld-linux-x86-64.so.2 $out/lib/${untarDir}/bin/container-executor + for n in $(find ${finalAttrs.containerExecutor}/bin -type f); do + ln -sf "$n" $out/lib/${finalAttrs.untarDir}/bin + done '' + '' - for n in $(find $out/lib/${untarDir}/bin -type f ! -name "*.*"); do + for n in $(find $out/lib/${finalAttrs.untarDir}/bin -type f ! -name "*.*"); do makeWrapper "$n" "$out/bin/$(basename $n)"\ - --set-default JAVA_HOME ${jdk.home}\ - --set-default HADOOP_HOME $out/lib/${untarDir}\ + --set-default JAVA_HOME ${finalAttrs.jdk.home}\ + --set-default HADOOP_HOME $out/lib/${finalAttrs.untarDir}\ --run "test -d /etc/hadoop-conf && export HADOOP_CONF_DIR=\''${HADOOP_CONF_DIR-'/etc/hadoop-conf/'}"\ - --set-default HADOOP_CONF_DIR $out/lib/${untarDir}/etc/hadoop/\ + --set-default HADOOP_CONF_DIR $out/lib/${finalAttrs.untarDir}/etc/hadoop/\ --prefix PATH : "${makeBinPath [ bash coreutils which]}"\ - --prefix JAVA_LIBRARY_PATH : "${makeLibraryPath buildInputs}" + --prefix JAVA_LIBRARY_PATH : "${makeLibraryPath finalAttrs.buildInputs}" done '' + optionalString sparkSupport '' # Add the spark shuffle service jar to YARN - cp ${spark.src}/yarn/spark-${spark.version}-yarn-shuffle.jar $out/lib/${untarDir}/share/hadoop/yarn/ - '' + libPatches; + cp ${spark.src}/yarn/spark-${spark.version}-yarn-shuffle.jar $out/lib/${finalAttrs.untarDir}/share/hadoop/yarn/ + '' + (finalAttrs.libPatches); passthru = { inherit tests; }; @@ -83,7 +94,7 @@ let maintainers = with maintainers; [ illustris ]; platforms = attrNames platformAttrs; } (attrByPath [ stdenv.system "meta" ] {} platformAttrs); - }; + }); in { # Different version of hadoop support different java runtime versions @@ -91,37 +102,39 @@ in hadoop_3_3 = common rec { pname = "hadoop"; platformAttrs = rec { - x86_64-linux = { - version = "3.3.5"; - hash = "sha256-RG4FypL6I6YGF6ixeUbe3kcoGvFQQEFhfLfV9i50JSo="; - }; - x86_64-darwin = x86_64-linux; - aarch64-linux = { - version = "3.3.5"; - hash = "sha256-qcKjbE881isauWBxIv+NY0UFbYit704/Re8Kdl6x1LA="; - }; - aarch64-darwin = aarch64-linux; + x86_64-linux = { + version = "3.3.6"; + hash = "sha256-9RlQWcDUECrap//xf3sqhd+Qa8tuGZSHFjGfmXhkGgQ="; + srcHash = "sha256-4OEsVhBNV9CJ+PN4FgCduUCVA9/el5yezSCZ6ko3+bU="; + }; + x86_64-darwin = x86_64-linux; + aarch64-linux = x86_64-linux // { + hash = "sha256-5Lv2uA72BJEva5v2yncyPe5gKNCNOPNsoHffVt6KXQ0="; + }; + aarch64-darwin = aarch64-linux; }; untarDir = "${pname}-${platformAttrs.${stdenv.system}.version}"; jdk = jdk11_headless; inherit openssl; # TODO: Package and add Intel Storage Acceleration Library - nativeLibs = [ stdenv.cc.cc.lib protobuf zlib snappy ]; - libPatches = '' - ln -s ${getLib cyrus_sasl}/lib/libsasl2.so $out/lib/${untarDir}/lib/native/libsasl2.so.2 - ln -s ${getLib openssl}/lib/libcrypto.so $out/lib/${untarDir}/lib/native/ - ln -s ${getLib zlib}/lib/libz.so.1 $out/lib/${untarDir}/lib/native/ - ln -s ${getLib zstd}/lib/libzstd.so.1 $out/lib/${untarDir}/lib/native/ - ln -s ${getLib bzip2}/lib/libbz2.so.1 $out/lib/${untarDir}/lib/native/ + nativeLibs = [ stdenv.cc.cc.lib protobuf zlib snappy libtirpc ]; + libPatchesGenerator = finalAttrs: ('' + ln -s ${getLib cyrus_sasl}/lib/libsasl2.so $out/lib/${finalAttrs.untarDir}/lib/native/libsasl2.so.2 + ln -s ${getLib openssl}/lib/libcrypto.so $out/lib/${finalAttrs.untarDir}/lib/native/ + ln -s ${getLib zlib}/lib/libz.so.1 $out/lib/${finalAttrs.untarDir}/lib/native/ + ln -s ${getLib zstd}/lib/libzstd.so.1 $out/lib/${finalAttrs.untarDir}/lib/native/ + ln -s ${getLib bzip2}/lib/libbz2.so.1 $out/lib/${finalAttrs.untarDir}/lib/native/ '' + optionalString stdenv.isLinux '' # libjvm.so for Java >=11 - patchelf --add-rpath ${jdk.home}/lib/server $out/lib/${untarDir}/lib/native/libnativetask.so.1.0.0 + patchelf --add-rpath ${finalAttrs.jdk.home}/lib/server $out/lib/${finalAttrs.untarDir}/lib/native/libnativetask.so.1.0.0 # Java 8 has libjvm.so at a different path - patchelf --add-rpath ${jdk.home}/jre/lib/amd64/server $out/lib/${untarDir}/lib/native/libnativetask.so.1.0.0 + patchelf --add-rpath ${finalAttrs.jdk.home}/jre/lib/amd64/server $out/lib/${finalAttrs.untarDir}/lib/native/libnativetask.so.1.0.0 # NixOS/nixpkgs#193370 # This workaround is needed to use protobuf 3.19 - patchelf --replace-needed libprotobuf.so.18 libprotobuf.so $out/lib/${untarDir}/lib/native/libhdfspp.so - ''; + patchelf --replace-needed libprotobuf.so.18 libprotobuf.so $out/lib/${finalAttrs.untarDir}/lib/native/libhdfspp.so + patchelf --replace-needed libcrypto.so.1.1 libcrypto.so \ + $out/lib/${finalAttrs.untarDir}/lib/native/{libhdfspp.so.0.1.0,examples/{pipes-sort,wordcount-nopipe,wordcount-part,wordcount-simple}} + ''); tests = nixosTests.hadoop; }; hadoop_3_2 = common rec { @@ -129,6 +142,7 @@ in platformAttrs.x86_64-linux = { version = "3.2.4"; hash = "sha256-qt2gpMr+NHuiVR+/zFRzRyRKG725/ZNBIM69z9J9wNw="; + srcHash = "sha256-F9nGD3mZZ1eJf3Ec3AJGE9YBcL/HiagskcdKQhCn/sw="; }; jdk = jdk8_headless; # not using native libs because of broken openssl_1_0_2 dependency @@ -140,6 +154,7 @@ in platformAttrs.x86_64-linux = { version = "2.10.2"; hash = "sha256-xhA4zxqIRGNhIeBnJO9dLKf/gx/Bq+uIyyZwsIafEyo="; + srcHash = "sha256-ucxCyXiJo8aL6aNMhZgKEbn8sGKOoMPVREbMGSfSdAI="; }; jdk = jdk8_headless; tests = nixosTests.hadoop2; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 237846ef28c9..cbed132677bf 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -17869,9 +17869,7 @@ with pkgs; groovy = callPackage ../development/interpreters/groovy { }; - inherit (callPackages ../applications/networking/cluster/hadoop { - openssl = openssl_1_1; - }) + inherit (callPackages ../applications/networking/cluster/hadoop {}) hadoop_3_3 hadoop_3_2 hadoop2; From 9be640a232166f14be4d38145970ffd63623c4d7 Mon Sep 17 00:00:00 2001 From: illustris Date: Fri, 22 Sep 2023 14:41:24 +0530 Subject: [PATCH 02/57] hadoop: support native libs on 3.2 --- .../networking/cluster/hadoop/default.nix | 56 ++++++++++--------- 1 file changed, 31 insertions(+), 25 deletions(-) diff --git a/pkgs/applications/networking/cluster/hadoop/default.nix b/pkgs/applications/networking/cluster/hadoop/default.nix index 7fb71069c76c..481217b44a84 100644 --- a/pkgs/applications/networking/cluster/hadoop/default.nix +++ b/pkgs/applications/networking/cluster/hadoop/default.nix @@ -28,13 +28,17 @@ with lib; assert elem stdenv.system [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ]; let - common = { pname, platformAttrs, untarDir ? "${pname}-${version}", jdk, openssl ? null, nativeLibs ? [ ], libPatchesGenerator ? (_: ""), tests }: + common = { + pname, platformAttrs, untarDir ? "${pname}-${version}", jdk + , nativeLibs ? [ ], libPatchesGenerator ? (_: ""), tests + }: stdenv.mkDerivation (finalAttrs: { - inherit pname jdk untarDir openssl; + inherit pname jdk untarDir; libPatches = libPatchesGenerator finalAttrs; version = platformAttrs.${stdenv.system}.version or (throw "Unsupported system: ${stdenv.system}"); src = fetchurl { - url = "mirror://apache/hadoop/common/hadoop-${finalAttrs.version}/hadoop-${finalAttrs.version}" + optionalString stdenv.isAarch64 "-aarch64" + ".tar.gz"; + url = "mirror://apache/hadoop/common/hadoop-${finalAttrs.version}/hadoop-${finalAttrs.version}" + + optionalString stdenv.isAarch64 "-aarch64" + ".tar.gz"; inherit (platformAttrs.${stdenv.system}) hash; }; doCheck = true; @@ -95,6 +99,27 @@ let platforms = attrNames platformAttrs; } (attrByPath [ stdenv.system "meta" ] {} platformAttrs); }); + nativeLibs = [ stdenv.cc.cc.lib protobuf zlib snappy libtirpc ]; + libPatchesGenerator = finalAttrs: ('' + ln -s ${getLib cyrus_sasl}/lib/libsasl2.so $out/lib/${finalAttrs.untarDir}/lib/native/libsasl2.so.2 + ln -s ${getLib openssl}/lib/libcrypto.so $out/lib/${finalAttrs.untarDir}/lib/native/ + ln -s ${getLib zlib}/lib/libz.so.1 $out/lib/${finalAttrs.untarDir}/lib/native/ + ln -s ${getLib zstd}/lib/libzstd.so.1 $out/lib/${finalAttrs.untarDir}/lib/native/ + ln -s ${getLib bzip2}/lib/libbz2.so.1 $out/lib/${finalAttrs.untarDir}/lib/native/ + '' + optionalString stdenv.isLinux '' + # libjvm.so for Java >=11 + patchelf --add-rpath ${finalAttrs.jdk.home}/lib/server $out/lib/${finalAttrs.untarDir}/lib/native/libnativetask.so.1.0.0 + # Java 8 has libjvm.so at a different path + patchelf --add-rpath ${finalAttrs.jdk.home}/jre/lib/amd64/server $out/lib/${finalAttrs.untarDir}/lib/native/libnativetask.so.1.0.0 + # NixOS/nixpkgs#193370 + # This workaround is needed to use protobuf 3.19 + # for hadoop 3.3 + patchelf --replace-needed libprotobuf.so.18 libprotobuf.so $out/lib/${finalAttrs.untarDir}/lib/native/libhdfspp.so + # for hadoop 3.2 + patchelf --replace-needed libprotobuf.so.8 libprotobuf.so $out/lib/${finalAttrs.untarDir}/lib/native/libhdfspp.so + patchelf --replace-needed libcrypto.so.1.1 libcrypto.so \ + $out/lib/${finalAttrs.untarDir}/lib/native/{libhdfspp.so.0.1.0,examples/{pipes-sort,wordcount-nopipe,wordcount-part,wordcount-simple}} + ''); in { # Different version of hadoop support different java runtime versions @@ -115,29 +140,11 @@ in }; untarDir = "${pname}-${platformAttrs.${stdenv.system}.version}"; jdk = jdk11_headless; - inherit openssl; + inherit nativeLibs libPatchesGenerator; # TODO: Package and add Intel Storage Acceleration Library - nativeLibs = [ stdenv.cc.cc.lib protobuf zlib snappy libtirpc ]; - libPatchesGenerator = finalAttrs: ('' - ln -s ${getLib cyrus_sasl}/lib/libsasl2.so $out/lib/${finalAttrs.untarDir}/lib/native/libsasl2.so.2 - ln -s ${getLib openssl}/lib/libcrypto.so $out/lib/${finalAttrs.untarDir}/lib/native/ - ln -s ${getLib zlib}/lib/libz.so.1 $out/lib/${finalAttrs.untarDir}/lib/native/ - ln -s ${getLib zstd}/lib/libzstd.so.1 $out/lib/${finalAttrs.untarDir}/lib/native/ - ln -s ${getLib bzip2}/lib/libbz2.so.1 $out/lib/${finalAttrs.untarDir}/lib/native/ - '' + optionalString stdenv.isLinux '' - # libjvm.so for Java >=11 - patchelf --add-rpath ${finalAttrs.jdk.home}/lib/server $out/lib/${finalAttrs.untarDir}/lib/native/libnativetask.so.1.0.0 - # Java 8 has libjvm.so at a different path - patchelf --add-rpath ${finalAttrs.jdk.home}/jre/lib/amd64/server $out/lib/${finalAttrs.untarDir}/lib/native/libnativetask.so.1.0.0 - # NixOS/nixpkgs#193370 - # This workaround is needed to use protobuf 3.19 - patchelf --replace-needed libprotobuf.so.18 libprotobuf.so $out/lib/${finalAttrs.untarDir}/lib/native/libhdfspp.so - patchelf --replace-needed libcrypto.so.1.1 libcrypto.so \ - $out/lib/${finalAttrs.untarDir}/lib/native/{libhdfspp.so.0.1.0,examples/{pipes-sort,wordcount-nopipe,wordcount-part,wordcount-simple}} - ''); tests = nixosTests.hadoop; }; - hadoop_3_2 = common rec { + hadoop_3_2 = common { pname = "hadoop"; platformAttrs.x86_64-linux = { version = "3.2.4"; @@ -145,8 +152,7 @@ in srcHash = "sha256-F9nGD3mZZ1eJf3Ec3AJGE9YBcL/HiagskcdKQhCn/sw="; }; jdk = jdk8_headless; - # not using native libs because of broken openssl_1_0_2 dependency - # can be manually overridden + inherit nativeLibs libPatchesGenerator; tests = nixosTests.hadoop_3_2; }; hadoop2 = common rec { From 1cd3c804bf4644fc168883c15b60baf596aba4fc Mon Sep 17 00:00:00 2001 From: illustris Date: Fri, 22 Sep 2023 16:34:07 +0530 Subject: [PATCH 03/57] hadoop, nixos/hadoop: remove untarDir --- .../services/cluster/hadoop/default.nix | 18 ++++---- .../modules/services/cluster/hadoop/yarn.nix | 2 +- nixos/tests/hadoop/hadoop.nix | 2 +- .../networking/cluster/hadoop/default.nix | 45 +++++++++---------- 4 files changed, 33 insertions(+), 34 deletions(-) diff --git a/nixos/modules/services/cluster/hadoop/default.nix b/nixos/modules/services/cluster/hadoop/default.nix index 72bf25c21146..ff6b4d5588b1 100644 --- a/nixos/modules/services/cluster/hadoop/default.nix +++ b/nixos/modules/services/cluster/hadoop/default.nix @@ -67,16 +67,16 @@ with lib; mapredSiteDefault = mkOption { default = { "mapreduce.framework.name" = "yarn"; - "yarn.app.mapreduce.am.env" = "HADOOP_MAPRED_HOME=${cfg.package}/lib/${cfg.package.untarDir}"; - "mapreduce.map.env" = "HADOOP_MAPRED_HOME=${cfg.package}/lib/${cfg.package.untarDir}"; - "mapreduce.reduce.env" = "HADOOP_MAPRED_HOME=${cfg.package}/lib/${cfg.package.untarDir}"; + "yarn.app.mapreduce.am.env" = "HADOOP_MAPRED_HOME=${cfg.package}"; + "mapreduce.map.env" = "HADOOP_MAPRED_HOME=${cfg.package}"; + "mapreduce.reduce.env" = "HADOOP_MAPRED_HOME=${cfg.package}"; }; defaultText = literalExpression '' { "mapreduce.framework.name" = "yarn"; - "yarn.app.mapreduce.am.env" = "HADOOP_MAPRED_HOME=''${config.${opt.package}}/lib/''${config.${opt.package}.untarDir}"; - "mapreduce.map.env" = "HADOOP_MAPRED_HOME=''${config.${opt.package}}/lib/''${config.${opt.package}.untarDir}"; - "mapreduce.reduce.env" = "HADOOP_MAPRED_HOME=''${config.${opt.package}}/lib/''${config.${opt.package}.untarDir}"; + "yarn.app.mapreduce.am.env" = "HADOOP_MAPRED_HOME=''${config.${opt.package}}"; + "mapreduce.map.env" = "HADOOP_MAPRED_HOME=''${config.${opt.package}}"; + "mapreduce.reduce.env" = "HADOOP_MAPRED_HOME=''${config.${opt.package}}"; } ''; type = types.attrsOf types.anything; @@ -154,13 +154,13 @@ with lib; }; log4jProperties = mkOption { - default = "${cfg.package}/lib/${cfg.package.untarDir}/etc/hadoop/log4j.properties"; + default = "${cfg.package}/etc/hadoop/log4j.properties"; defaultText = literalExpression '' - "''${config.${opt.package}}/lib/''${config.${opt.package}.untarDir}/etc/hadoop/log4j.properties" + "''${config.${opt.package}}/etc/hadoop/log4j.properties" ''; type = types.path; example = literalExpression '' - "''${pkgs.hadoop}/lib/''${pkgs.hadoop.untarDir}/etc/hadoop/log4j.properties"; + "''${pkgs.hadoop}/etc/hadoop/log4j.properties"; ''; description = lib.mdDoc "log4j.properties file added to HADOOP_CONF_DIR"; }; diff --git a/nixos/modules/services/cluster/hadoop/yarn.nix b/nixos/modules/services/cluster/hadoop/yarn.nix index 26077f35fdd0..a49aafbd1dca 100644 --- a/nixos/modules/services/cluster/hadoop/yarn.nix +++ b/nixos/modules/services/cluster/hadoop/yarn.nix @@ -160,7 +160,7 @@ in umount /run/wrappers/yarn-nodemanager/cgroup/cpu || true rm -rf /run/wrappers/yarn-nodemanager/ || true mkdir -p /run/wrappers/yarn-nodemanager/{bin,etc/hadoop,cgroup/cpu} - cp ${cfg.package}/lib/${cfg.package.untarDir}/bin/container-executor /run/wrappers/yarn-nodemanager/bin/ + cp ${cfg.package}/bin/container-executor /run/wrappers/yarn-nodemanager/bin/ chgrp hadoop /run/wrappers/yarn-nodemanager/bin/container-executor chmod 6050 /run/wrappers/yarn-nodemanager/bin/container-executor cp ${hadoopConf}/container-executor.cfg /run/wrappers/yarn-nodemanager/etc/hadoop/ diff --git a/nixos/tests/hadoop/hadoop.nix b/nixos/tests/hadoop/hadoop.nix index b132f4fa58b0..0de2366b1864 100644 --- a/nixos/tests/hadoop/hadoop.nix +++ b/nixos/tests/hadoop/hadoop.nix @@ -249,7 +249,7 @@ import ../make-test-python.nix ({ package, ... }: { assert "standby" in client.succeed("sudo -u yarn yarn rmadmin -getAllServiceState") client.succeed("sudo -u yarn yarn rmadmin -getAllServiceState | systemd-cat") - assert "Estimated value of Pi is" in client.succeed("HADOOP_USER_NAME=hdfs yarn jar $(readlink $(which yarn) | sed -r 's~bin/yarn~lib/hadoop-*/share/hadoop/mapreduce/hadoop-mapreduce-examples-*.jar~g') pi 2 10") + assert "Estimated value of Pi is" in client.succeed("HADOOP_USER_NAME=hdfs yarn jar $(readlink $(which yarn) | sed -r 's~bin/yarn~share/hadoop/mapreduce/hadoop-mapreduce-examples-*.jar~g') pi 2 10") assert "SUCCEEDED" in client.succeed("yarn application -list -appStates FINISHED") ''; }) diff --git a/pkgs/applications/networking/cluster/hadoop/default.nix b/pkgs/applications/networking/cluster/hadoop/default.nix index 481217b44a84..b952331a23b6 100644 --- a/pkgs/applications/networking/cluster/hadoop/default.nix +++ b/pkgs/applications/networking/cluster/hadoop/default.nix @@ -29,11 +29,11 @@ assert elem stdenv.system [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarc let common = { - pname, platformAttrs, untarDir ? "${pname}-${version}", jdk - , nativeLibs ? [ ], libPatchesGenerator ? (_: ""), tests + pname, platformAttrs, jdk, nativeLibs ? [ ] + , libPatchesGenerator ? (_: ""), tests }: stdenv.mkDerivation (finalAttrs: { - inherit pname jdk untarDir; + inherit pname jdk; libPatches = libPatchesGenerator finalAttrs; version = platformAttrs.${stdenv.system}.version or (throw "Unsupported system: ${stdenv.system}"); src = fetchurl { @@ -51,29 +51,29 @@ let }; nativeBuildInputs = [ makeWrapper ] - ++ optionals (stdenv.isLinux && (nativeLibs != [ ] || (libPatches finalAttrs) != "")) [ autoPatchelfHook ]; + ++ optionals (stdenv.isLinux && (nativeLibs != [ ] || (libPatchesGenerator finalAttrs) != "")) [ autoPatchelfHook ]; buildInputs = [ openssl ] ++ nativeLibs; installPhase = '' - mkdir -p $out/{lib/${finalAttrs.untarDir}/conf,bin,lib} - mv * $out/lib/${finalAttrs.untarDir} + mkdir $out + mv * $out/ '' + optionalString stdenv.isLinux '' for n in $(find ${finalAttrs.containerExecutor}/bin -type f); do - ln -sf "$n" $out/lib/${finalAttrs.untarDir}/bin + ln -sf "$n" $out/bin done '' + '' - for n in $(find $out/lib/${finalAttrs.untarDir}/bin -type f ! -name "*.*"); do - makeWrapper "$n" "$out/bin/$(basename $n)"\ + for n in $(find $out/bin -type f ! -name "*.*"); do + wrapProgram "$n"\ --set-default JAVA_HOME ${finalAttrs.jdk.home}\ - --set-default HADOOP_HOME $out/lib/${finalAttrs.untarDir}\ + --set-default HADOOP_HOME $out/\ --run "test -d /etc/hadoop-conf && export HADOOP_CONF_DIR=\''${HADOOP_CONF_DIR-'/etc/hadoop-conf/'}"\ - --set-default HADOOP_CONF_DIR $out/lib/${finalAttrs.untarDir}/etc/hadoop/\ + --set-default HADOOP_CONF_DIR $out/etc/hadoop/\ --prefix PATH : "${makeBinPath [ bash coreutils which]}"\ --prefix JAVA_LIBRARY_PATH : "${makeLibraryPath finalAttrs.buildInputs}" done '' + optionalString sparkSupport '' # Add the spark shuffle service jar to YARN - cp ${spark.src}/yarn/spark-${spark.version}-yarn-shuffle.jar $out/lib/${finalAttrs.untarDir}/share/hadoop/yarn/ + cp ${spark.src}/yarn/spark-${spark.version}-yarn-shuffle.jar $out/share/hadoop/yarn/ '' + (finalAttrs.libPatches); passthru = { inherit tests; }; @@ -101,24 +101,24 @@ let }); nativeLibs = [ stdenv.cc.cc.lib protobuf zlib snappy libtirpc ]; libPatchesGenerator = finalAttrs: ('' - ln -s ${getLib cyrus_sasl}/lib/libsasl2.so $out/lib/${finalAttrs.untarDir}/lib/native/libsasl2.so.2 - ln -s ${getLib openssl}/lib/libcrypto.so $out/lib/${finalAttrs.untarDir}/lib/native/ - ln -s ${getLib zlib}/lib/libz.so.1 $out/lib/${finalAttrs.untarDir}/lib/native/ - ln -s ${getLib zstd}/lib/libzstd.so.1 $out/lib/${finalAttrs.untarDir}/lib/native/ - ln -s ${getLib bzip2}/lib/libbz2.so.1 $out/lib/${finalAttrs.untarDir}/lib/native/ + ln -s ${getLib cyrus_sasl}/lib/libsasl2.so $out/lib/native/libsasl2.so.2 + ln -s ${getLib openssl}/lib/libcrypto.so $out/lib/native/ + ln -s ${getLib zlib}/lib/libz.so.1 $out/lib/native/ + ln -s ${getLib zstd}/lib/libzstd.so.1 $out/lib/native/ + ln -s ${getLib bzip2}/lib/libbz2.so.1 $out/lib/native/ '' + optionalString stdenv.isLinux '' # libjvm.so for Java >=11 - patchelf --add-rpath ${finalAttrs.jdk.home}/lib/server $out/lib/${finalAttrs.untarDir}/lib/native/libnativetask.so.1.0.0 + patchelf --add-rpath ${finalAttrs.jdk.home}/lib/server $out/lib/native/libnativetask.so.1.0.0 # Java 8 has libjvm.so at a different path - patchelf --add-rpath ${finalAttrs.jdk.home}/jre/lib/amd64/server $out/lib/${finalAttrs.untarDir}/lib/native/libnativetask.so.1.0.0 + patchelf --add-rpath ${finalAttrs.jdk.home}/jre/lib/amd64/server $out/lib/native/libnativetask.so.1.0.0 # NixOS/nixpkgs#193370 # This workaround is needed to use protobuf 3.19 # for hadoop 3.3 - patchelf --replace-needed libprotobuf.so.18 libprotobuf.so $out/lib/${finalAttrs.untarDir}/lib/native/libhdfspp.so + patchelf --replace-needed libprotobuf.so.18 libprotobuf.so $out/lib/native/libhdfspp.so # for hadoop 3.2 - patchelf --replace-needed libprotobuf.so.8 libprotobuf.so $out/lib/${finalAttrs.untarDir}/lib/native/libhdfspp.so + patchelf --replace-needed libprotobuf.so.8 libprotobuf.so $out/lib/native/libhdfspp.so patchelf --replace-needed libcrypto.so.1.1 libcrypto.so \ - $out/lib/${finalAttrs.untarDir}/lib/native/{libhdfspp.so.0.1.0,examples/{pipes-sort,wordcount-nopipe,wordcount-part,wordcount-simple}} + $out/lib/native/{libhdfspp.so.0.1.0,examples/{pipes-sort,wordcount-nopipe,wordcount-part,wordcount-simple}} ''); in { @@ -138,7 +138,6 @@ in }; aarch64-darwin = aarch64-linux; }; - untarDir = "${pname}-${platformAttrs.${stdenv.system}.version}"; jdk = jdk11_headless; inherit nativeLibs libPatchesGenerator; # TODO: Package and add Intel Storage Acceleration Library From ef4843339891c10edb550368ae77446441321f28 Mon Sep 17 00:00:00 2001 From: illustris Date: Sun, 24 Sep 2023 00:35:22 +0530 Subject: [PATCH 04/57] hadoop: add native libs support in all versions --- .../cluster/hadoop/containerExecutor.nix | 4 +- .../networking/cluster/hadoop/default.nix | 64 +++++++++---------- 2 files changed, 33 insertions(+), 35 deletions(-) diff --git a/pkgs/applications/networking/cluster/hadoop/containerExecutor.nix b/pkgs/applications/networking/cluster/hadoop/containerExecutor.nix index 69b25784be67..3845026fd4a3 100644 --- a/pkgs/applications/networking/cluster/hadoop/containerExecutor.nix +++ b/pkgs/applications/networking/cluster/hadoop/containerExecutor.nix @@ -1,4 +1,4 @@ -{ version, hash, stdenv, fetchurl, lib, cmake, openssl, platformAttrs, ... }: +{ version, stdenv, fetchurl, lib, cmake, openssl, platformAttrs, ... }: stdenv.mkDerivation (finalAttrs: { pname = "hadoop-yarn-containerexecutor"; @@ -6,7 +6,7 @@ stdenv.mkDerivation (finalAttrs: { src = fetchurl { url = with finalAttrs; "mirror://apache/hadoop/common/hadoop-${finalAttrs.version}/hadoop-${finalAttrs.version}-src.tar.gz"; - inherit hash; + hash = platformAttrs.${stdenv.system}.srcHash; }; sourceRoot = "hadoop-${finalAttrs.version}-src/hadoop-yarn-project/hadoop-yarn/" +"hadoop-yarn-server/hadoop-yarn-server-nodemanager/src"; diff --git a/pkgs/applications/networking/cluster/hadoop/default.nix b/pkgs/applications/networking/cluster/hadoop/default.nix index b952331a23b6..f90ec32177c4 100644 --- a/pkgs/applications/networking/cluster/hadoop/default.nix +++ b/pkgs/applications/networking/cluster/hadoop/default.nix @@ -28,13 +28,9 @@ with lib; assert elem stdenv.system [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ]; let - common = { - pname, platformAttrs, jdk, nativeLibs ? [ ] - , libPatchesGenerator ? (_: ""), tests - }: + common = { pname, platformAttrs, jdk, tests }: stdenv.mkDerivation (finalAttrs: { inherit pname jdk; - libPatches = libPatchesGenerator finalAttrs; version = platformAttrs.${stdenv.system}.version or (throw "Unsupported system: ${stdenv.system}"); src = fetchurl { url = "mirror://apache/hadoop/common/hadoop-${finalAttrs.version}/hadoop-${finalAttrs.version}" @@ -47,12 +43,11 @@ let containerExecutor = callPackage ./containerExecutor.nix { inherit (finalAttrs) version; inherit platformAttrs; - hash = platformAttrs.${stdenv.system}.srcHash; }; nativeBuildInputs = [ makeWrapper ] - ++ optionals (stdenv.isLinux && (nativeLibs != [ ] || (libPatchesGenerator finalAttrs) != "")) [ autoPatchelfHook ]; - buildInputs = [ openssl ] ++ nativeLibs; + ++ optionals stdenv.isLinux [ autoPatchelfHook ]; + buildInputs = [ stdenv.cc.cc.lib openssl protobuf zlib snappy libtirpc ]; installPhase = '' mkdir $out @@ -61,6 +56,32 @@ let for n in $(find ${finalAttrs.containerExecutor}/bin -type f); do ln -sf "$n" $out/bin done + + # these libraries are loaded at runtime by the JVM + ln -s ${getLib cyrus_sasl}/lib/libsasl2.so $out/lib/native/libsasl2.so.2 + ln -s ${getLib openssl}/lib/libcrypto.so $out/lib/native/ + ln -s ${getLib zlib}/lib/libz.so.1 $out/lib/native/ + ln -s ${getLib zstd}/lib/libzstd.so.1 $out/lib/native/ + ln -s ${getLib bzip2}/lib/libbz2.so.1 $out/lib/native/ + ln -s ${getLib snappy}/lib/libsnappy.so.1 $out/lib/native/ + + # libjvm.so is in different paths for java 8 and 11 + # libnativetask.so in hadooop 3 and libhdfs.so in hadoop 2 depend on it + find $out/lib/native/ -name 'libnativetask.so*' -o -name 'libhdfs.so*' | \ + xargs -n1 patchelf --add-rpath $(dirname $(find ${finalAttrs.jdk.home} -name libjvm.so | head -n1)) + + # NixOS/nixpkgs#193370 + # This workaround is needed to use protobuf 3.19 + # hadoop 3.3+ depends on protobuf 3.18, 3.2 depends on 3.8 + find $out/lib/native -name 'libhdfspp.so*' | \ + xargs -r -n1 patchelf --replace-needed libprotobuf.so.${ + if (versionAtLeast finalAttrs.version "3.3") then "18" + else "8" + } libprotobuf.so + + patchelf --replace-needed libcrypto.so.1.1 libcrypto.so \ + $out/lib/native/{libhdfs{pp,}.so*,examples/{pipes-sort,wordcount-nopipe,wordcount-part,wordcount-simple}} + '' + '' for n in $(find $out/bin -type f ! -name "*.*"); do wrapProgram "$n"\ @@ -71,10 +92,10 @@ let --prefix PATH : "${makeBinPath [ bash coreutils which]}"\ --prefix JAVA_LIBRARY_PATH : "${makeLibraryPath finalAttrs.buildInputs}" done - '' + optionalString sparkSupport '' + '' + (optionalString sparkSupport '' # Add the spark shuffle service jar to YARN cp ${spark.src}/yarn/spark-${spark.version}-yarn-shuffle.jar $out/share/hadoop/yarn/ - '' + (finalAttrs.libPatches); + ''); passthru = { inherit tests; }; @@ -99,27 +120,6 @@ let platforms = attrNames platformAttrs; } (attrByPath [ stdenv.system "meta" ] {} platformAttrs); }); - nativeLibs = [ stdenv.cc.cc.lib protobuf zlib snappy libtirpc ]; - libPatchesGenerator = finalAttrs: ('' - ln -s ${getLib cyrus_sasl}/lib/libsasl2.so $out/lib/native/libsasl2.so.2 - ln -s ${getLib openssl}/lib/libcrypto.so $out/lib/native/ - ln -s ${getLib zlib}/lib/libz.so.1 $out/lib/native/ - ln -s ${getLib zstd}/lib/libzstd.so.1 $out/lib/native/ - ln -s ${getLib bzip2}/lib/libbz2.so.1 $out/lib/native/ - '' + optionalString stdenv.isLinux '' - # libjvm.so for Java >=11 - patchelf --add-rpath ${finalAttrs.jdk.home}/lib/server $out/lib/native/libnativetask.so.1.0.0 - # Java 8 has libjvm.so at a different path - patchelf --add-rpath ${finalAttrs.jdk.home}/jre/lib/amd64/server $out/lib/native/libnativetask.so.1.0.0 - # NixOS/nixpkgs#193370 - # This workaround is needed to use protobuf 3.19 - # for hadoop 3.3 - patchelf --replace-needed libprotobuf.so.18 libprotobuf.so $out/lib/native/libhdfspp.so - # for hadoop 3.2 - patchelf --replace-needed libprotobuf.so.8 libprotobuf.so $out/lib/native/libhdfspp.so - patchelf --replace-needed libcrypto.so.1.1 libcrypto.so \ - $out/lib/native/{libhdfspp.so.0.1.0,examples/{pipes-sort,wordcount-nopipe,wordcount-part,wordcount-simple}} - ''); in { # Different version of hadoop support different java runtime versions @@ -139,7 +139,6 @@ in aarch64-darwin = aarch64-linux; }; jdk = jdk11_headless; - inherit nativeLibs libPatchesGenerator; # TODO: Package and add Intel Storage Acceleration Library tests = nixosTests.hadoop; }; @@ -151,7 +150,6 @@ in srcHash = "sha256-F9nGD3mZZ1eJf3Ec3AJGE9YBcL/HiagskcdKQhCn/sw="; }; jdk = jdk8_headless; - inherit nativeLibs libPatchesGenerator; tests = nixosTests.hadoop_3_2; }; hadoop2 = common rec { From 21fa56c145258730be931cb870094b87997429cf Mon Sep 17 00:00:00 2001 From: illustris Date: Sun, 24 Sep 2023 00:55:42 +0530 Subject: [PATCH 05/57] hadoop: fix eval on darwin --- pkgs/applications/networking/cluster/hadoop/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/networking/cluster/hadoop/default.nix b/pkgs/applications/networking/cluster/hadoop/default.nix index f90ec32177c4..b36921e89792 100644 --- a/pkgs/applications/networking/cluster/hadoop/default.nix +++ b/pkgs/applications/networking/cluster/hadoop/default.nix @@ -47,7 +47,7 @@ let nativeBuildInputs = [ makeWrapper ] ++ optionals stdenv.isLinux [ autoPatchelfHook ]; - buildInputs = [ stdenv.cc.cc.lib openssl protobuf zlib snappy libtirpc ]; + buildInputs = optionals stdenv.isLinux [ stdenv.cc.cc.lib openssl protobuf zlib snappy libtirpc ]; installPhase = '' mkdir $out From e5415d50184fe1c609c85fec82286b9acc77b5ac Mon Sep 17 00:00:00 2001 From: Per Stark Date: Sun, 8 Oct 2023 11:32:02 +0200 Subject: [PATCH 06/57] maintainers: add perstark --- maintainers/maintainer-list.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index f8b83f13e89f..58138d236a45 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -12992,6 +12992,12 @@ githubId = 152312; name = "Periklis Tsirakidis"; }; + perstark = { + email = "perstark.se@gmail.com"; + github = "perstarkse"; + githubId = 63069986; + name = "Per Stark"; + }; petercommand = { email = "petercommand@gmail.com"; github = "petercommand"; From b1926f189e4122460af0e7dd49f5c700bf957c97 Mon Sep 17 00:00:00 2001 From: illustris Date: Mon, 9 Oct 2023 18:49:06 +0530 Subject: [PATCH 07/57] hadoop: fix build on darwin --- .../networking/cluster/hadoop/containerExecutor.nix | 2 +- pkgs/applications/networking/cluster/hadoop/default.nix | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/networking/cluster/hadoop/containerExecutor.nix b/pkgs/applications/networking/cluster/hadoop/containerExecutor.nix index 3845026fd4a3..83f2fe971d41 100644 --- a/pkgs/applications/networking/cluster/hadoop/containerExecutor.nix +++ b/pkgs/applications/networking/cluster/hadoop/containerExecutor.nix @@ -32,6 +32,6 @@ stdenv.mkDerivation (finalAttrs: { ''; maintainers = with maintainers; [ illustris ]; - platforms = attrNames platformAttrs; + platforms = filter (strings.hasSuffix "linux") (attrNames platformAttrs); }; }) diff --git a/pkgs/applications/networking/cluster/hadoop/default.nix b/pkgs/applications/networking/cluster/hadoop/default.nix index b36921e89792..d5bae9ad885b 100644 --- a/pkgs/applications/networking/cluster/hadoop/default.nix +++ b/pkgs/applications/networking/cluster/hadoop/default.nix @@ -40,10 +40,11 @@ let doCheck = true; # Build the container executor binary from source - containerExecutor = callPackage ./containerExecutor.nix { + # InstallPhase is not lazily evaluating containerExecutor for some reason + containerExecutor = if stdenv.isLinux then (callPackage ./containerExecutor.nix { inherit (finalAttrs) version; inherit platformAttrs; - }; + }) else ""; nativeBuildInputs = [ makeWrapper ] ++ optionals stdenv.isLinux [ autoPatchelfHook ]; From ff16588aa6a57b5f3abeed6f85ce742a213ab0ae Mon Sep 17 00:00:00 2001 From: Per Stark Date: Mon, 9 Oct 2023 20:05:08 +0200 Subject: [PATCH 08/57] blinkstick: 1.2.0 -> unstable-2023-05-04 --- .../python-modules/blinkstick/default.nix | 30 +++++++------------ 1 file changed, 11 insertions(+), 19 deletions(-) diff --git a/pkgs/development/python-modules/blinkstick/default.nix b/pkgs/development/python-modules/blinkstick/default.nix index d3de7561bec2..bafd5254b968 100644 --- a/pkgs/development/python-modules/blinkstick/default.nix +++ b/pkgs/development/python-modules/blinkstick/default.nix @@ -1,35 +1,27 @@ -{ lib -, buildPythonPackage -, fetchPypi -, pyusb -}: +{ lib, buildPythonPackage, fetchFromGitHub, pyusb }: buildPythonPackage rec { pname = "blinkstick"; - version = "1.2.0"; + version = "unstable-2023-05-04"; + format = "setuptools"; - src = fetchPypi { - inherit pname version; - sha256 = "0rdk3i81s6byw23za0bxvkh7sj5l16qxxgc2c53qjg3klc24wcm9"; + src = fetchFromGitHub { + owner = "arvydas"; + repo = "blinkstick-python"; + rev = "8140b9fa18a9ff4f0e9df8e70c073f41cb8f1d35"; + hash = "sha256-9bc7TD/Ilc952ywLauFd0+3Lh64lQlYuDC1KG9eWDgs="; }; - # Upstream fix https://github.com/arvydas/blinkstick-python/pull/54 - # https://github.com/arvydas/blinkstick-python/pull/54/commits/b9bee2cd72f799f1210e5d9e13207f93bbc2d244.patch - # has line ending issues after 1.2.0 - postPatch = '' - substituteInPlace setup.py --replace "pyusb==1.0.0" "pyusb>=1.0.0" - ''; - propagatedBuildInputs = [ pyusb ]; # Project has no tests doCheck = false; pythonImportsCheck = [ "blinkstick" ]; - meta = with lib; { + meta = { description = "Python package to control BlinkStick USB devices"; homepage = "https://github.com/arvydas/blinkstick-python"; - license = licenses.bsd3; - maintainers = with maintainers; [ np ]; + license = lib.licenses.bsd3; + maintainers = with lib.maintainers; [ np perstark ]; }; } From 3771ec45c0adef0a8687657b8633b6adbf96e053 Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Fri, 13 Oct 2023 13:37:18 +0200 Subject: [PATCH 09/57] xsct: init at 2.0 --- pkgs/by-name/xs/xsct/package.nix | 38 ++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 pkgs/by-name/xs/xsct/package.nix diff --git a/pkgs/by-name/xs/xsct/package.nix b/pkgs/by-name/xs/xsct/package.nix new file mode 100644 index 000000000000..80023f676c49 --- /dev/null +++ b/pkgs/by-name/xs/xsct/package.nix @@ -0,0 +1,38 @@ +{ stdenv +, lib +, fetchFromGitHub +, gitUpdater +, libX11 +, libXrandr +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "xsct"; + version = "2.0"; + + src = fetchFromGitHub { + owner = "faf0"; + repo = "sct"; + rev = finalAttrs.version; + hash = "sha256-XhrkaK85I/U2ChO5mZYah/TaXz03yahfMEbfgzXqytU="; + }; + + buildInputs = [ + libX11 + libXrandr + ]; + + makeFlags = [ + "PREFIX=${placeholder "out"}" + ]; + + passthru.updateScript = gitUpdater { }; + + meta = with lib; { + description = "Set color temperature of screen"; + homepage = "https://github.com/faf0/sct"; + license = licenses.unlicense; + maintainers = with maintainers; [ OPNA2608 ]; + platforms = with platforms; linux ++ freebsd ++ openbsd; + }; +}) From fd04990a6f6725141c2f3d7cf6dd59785fc96477 Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Sat, 14 Oct 2023 10:03:46 +0200 Subject: [PATCH 10/57] dbus-cpp: init at 5.0.3 --- pkgs/by-name/db/dbus-cpp/package.nix | 122 +++++++++++++++++++++++++++ 1 file changed, 122 insertions(+) create mode 100644 pkgs/by-name/db/dbus-cpp/package.nix diff --git a/pkgs/by-name/db/dbus-cpp/package.nix b/pkgs/by-name/db/dbus-cpp/package.nix new file mode 100644 index 000000000000..1aa09505c8df --- /dev/null +++ b/pkgs/by-name/db/dbus-cpp/package.nix @@ -0,0 +1,122 @@ +{ stdenv +, lib +, fetchFromGitLab +, fetchpatch +, gitUpdater +, testers +, boost +, cmake +, dbus +, doxygen +, graphviz +, gtest +, libxml2 +, lomiri +, pkg-config +, process-cpp +, properties-cpp +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "dbus-cpp"; + version = "5.0.3"; + + src = fetchFromGitLab { + owner = "ubports"; + repo = "development/core/lib-cpp/dbus-cpp"; + rev = finalAttrs.version; + hash = "sha256-t8SzPRUuKeEchT8vAsITf8MwbgHA+mR5C9CnkdVyX7s="; + }; + + outputs = [ + "out" + "dev" + "doc" + "examples" + ]; + + patches = [ + # Handle already-stolen dbus call better + # Remove when version > 5.0.3 + (fetchpatch { + name = "0001-dbus-cpp-src-Dont-steal-a-pending-dbus-call-more-then-once.patch"; + url = "https://gitlab.com/ubports/development/core/lib-cpp/dbus-cpp/-/commit/9f3d1ff2b1c6c732285949c3dbb35e40cf55ea92.patch"; + hash = "sha256-xzOCIJVsK2J+X9RsV930R9uw6h4UxqwSaNOgv8v4qQU="; + }) + + # Fix GCC13 compilation + # Remove when version > 5.0.3 + (fetchpatch { + name = "0002-dbus-cpp-Add-missing-headers-for-GCC13.patch"; + url = "https://gitlab.com/ubports/development/core/lib-cpp/dbus-cpp/-/commit/c761b1eec084962dbe64d35d7f7b86dcbe57a3f7.patch"; + hash = "sha256-/tKe3iHWxP9jWtpdgwwRynj8565u9LxCt4WXJDXzgX4="; + }) + ]; + + postPatch = '' + substituteInPlace doc/CMakeLists.txt \ + --replace 'DESTINATION share/''${CMAKE_PROJECT_NAME}/doc' 'DESTINATION ''${CMAKE_INSTALL_DOCDIR}' + + # Warning on aarch64-linux breaks build due to -Werror + substituteInPlace CMakeLists.txt \ + --replace '-Werror' "" + '' + lib.optionalString (!finalAttrs.doCheck) '' + sed -i -e '/add_subdirectory(tests)/d' CMakeLists.txt + ''; + + strictDeps = true; + + nativeBuildInputs = [ + cmake + doxygen + graphviz + pkg-config + ]; + + buildInputs = [ + boost + lomiri.cmake-extras + dbus + libxml2 + process-cpp + properties-cpp + ]; + + nativeCheckInputs = [ + dbus + ]; + + checkInputs = [ + gtest + ]; + + cmakeFlags = [ + "-DDBUS_CPP_ENABLE_DOC_GENERATION=ON" + ]; + + doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform; + + # DBus mess, hoping this fixes occational flakiness + enableParallelChecking = false; + + preFixup = '' + moveToOutput libexec/examples $examples + ''; + + passthru = { + tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; + updateScript = gitUpdater { }; + }; + + meta = with lib; { + description = "A dbus-binding leveraging C++-11"; + homepage = "https://gitlab.com/ubports/development/core/lib-cpp/dbus-cpp"; + license = licenses.lgpl3Only; + maintainers = with maintainers; [ OPNA2608 ]; + mainProgram = "dbus-cppc"; + platforms = platforms.linux; + pkgConfigModules = [ + "dbus-cpp" + ]; + }; +}) From 99202824be73c502945b3fdbd651f724a2361671 Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Sat, 14 Oct 2023 11:26:59 +0200 Subject: [PATCH 11/57] dbus-cpp: Disable tests Tests seem very flaky on some systems / for some ppl. Consistently fail on OfBorg ARM CI, past reports of sporadic test failures on amd64. Not sure if due to weak systems or DBus weirdness. Disabling for now. --- pkgs/by-name/db/dbus-cpp/package.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/db/dbus-cpp/package.nix b/pkgs/by-name/db/dbus-cpp/package.nix index 1aa09505c8df..6ad4c355b6ad 100644 --- a/pkgs/by-name/db/dbus-cpp/package.nix +++ b/pkgs/by-name/db/dbus-cpp/package.nix @@ -94,9 +94,10 @@ stdenv.mkDerivation (finalAttrs: { "-DDBUS_CPP_ENABLE_DOC_GENERATION=ON" ]; - doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform; + # Too flaky on ARM CI & for some amd64 users + doCheck = false; - # DBus mess, hoping this fixes occational flakiness + # DBus, parallelism messes with communication enableParallelChecking = false; preFixup = '' From 57db0508e65f41ce9c248d67880d7d90b80fb686 Mon Sep 17 00:00:00 2001 From: Madoura Date: Tue, 17 Oct 2023 00:52:44 -0500 Subject: [PATCH 12/57] rocmPackages.rocmUpdateScript: use 'releases/latest' by default --- pkgs/development/rocm-modules/5/update.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/rocm-modules/5/update.nix b/pkgs/development/rocm-modules/5/update.nix index 1cc7e354d240..e20697675c11 100644 --- a/pkgs/development/rocm-modules/5/update.nix +++ b/pkgs/development/rocm-modules/5/update.nix @@ -5,8 +5,8 @@ { name ? "" , owner ? "" , repo ? "" -, page ? "releases?per_page=1" -, filter ? ".[0].tag_name | split(\"-\") | .[1]" +, page ? "releases/latest" +, filter ? ".tag_name | split(\"-\") | .[1]" }: let From 79b7cbd55d0f0cf517069d6447227c1b9b11a1da Mon Sep 17 00:00:00 2001 From: Madoura Date: Tue, 17 Oct 2023 00:45:38 -0500 Subject: [PATCH 13/57] rocmPackages.rocm-cmake: no need to specify page/filter now --- pkgs/development/rocm-modules/5/rocm-cmake/default.nix | 2 -- 1 file changed, 2 deletions(-) diff --git a/pkgs/development/rocm-modules/5/rocm-cmake/default.nix b/pkgs/development/rocm-modules/5/rocm-cmake/default.nix index 04ae947d3a4a..9e9cf3caf12e 100644 --- a/pkgs/development/rocm-modules/5/rocm-cmake/default.nix +++ b/pkgs/development/rocm-modules/5/rocm-cmake/default.nix @@ -22,8 +22,6 @@ stdenv.mkDerivation (finalAttrs: { name = finalAttrs.pname; owner = finalAttrs.src.owner; repo = finalAttrs.src.repo; - page = "releases?per_page=2"; - filter = ".[1].tag_name | split(\"-\") | .[1]"; }; meta = with lib; { From 26b379fbbaa6a03425e5c52e9ac6a93e573bf09b Mon Sep 17 00:00:00 2001 From: Madoura Date: Tue, 17 Oct 2023 01:18:14 -0500 Subject: [PATCH 14/57] rocmPackages.clr: use tags for update script --- pkgs/development/rocm-modules/5/clr/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/rocm-modules/5/clr/default.nix b/pkgs/development/rocm-modules/5/clr/default.nix index 8a5d695e2b4c..5e4039586211 100644 --- a/pkgs/development/rocm-modules/5/clr/default.nix +++ b/pkgs/development/rocm-modules/5/clr/default.nix @@ -144,6 +144,8 @@ in stdenv.mkDerivation (finalAttrs: { name = finalAttrs.pname; owner = finalAttrs.src.owner; repo = finalAttrs.src.repo; + page = "tags?per_page=1"; + filter = ".[0].name | split(\"-\") | .[1]"; }; impureTests = { From 39b6fcc8c72dc7d52955076cbe01d76c7140424c Mon Sep 17 00:00:00 2001 From: Madoura Date: Tue, 17 Oct 2023 05:53:19 +0000 Subject: [PATCH 15/57] rocmPackages: 5.7.0 -> 5.7.1 rocmPackages.clang-ocl: 5.7.0 -> 5.7.1 rocmPackages.hip-common: 5.7.0 -> 5.7.1 rocmPackages.half: 5.7.0 -> 5.7.1 rocmPackages.hipcc: 5.7.0 -> 5.7.1 rocmPackages.hipcub: 5.7.0 -> 5.7.1 rocmPackages.hipfft: 5.7.0 -> 5.7.1 rocmPackages.composable_kernel: 5.7.0 -> 5.7.1 rocmPackages.hipblas: 5.7.0 -> 5.7.1 rocmPackages.hiprand: 5.7.0 -> 5.7.1 rocmPackages.hipsolver: 5.7.0 -> 5.7.1 rocmPackages.hipsparse: 5.7.0 -> 5.7.1 rocmPackages.llvm.llvm: 5.7.0 -> 5.7.1 rocmPackages.migraphx: 5.7.0 -> 5.7.1 rocmPackages.hipfort: 5.7.0 -> 5.7.1 rocmPackages.miopen: 5.7.0 -> 5.7.1 rocmPackages.mivisionx: 5.7.0 -> 5.7.1 rocmPackages.hipify: 5.7.0 -> 5.7.1 rocmPackages.rocalution: 5.7.0 -> 5.7.1 rocmPackages.rocblas: 5.7.0 -> 5.7.1 rocmPackages.rdc: 5.7.0 -> 5.7.1 rocmPackages.rocfft: 5.7.0 -> 5.7.1 rocmPackages.rocgdb: 5.7.0 -> 5.7.1 rocmPackages.rccl: 5.7.0 -> 5.7.1 rocmPackages.rocm-comgr: 5.7.0 -> 5.7.1 rocmPackages.rocm-cmake: 5.7.0 -> 5.7.1 rocmPackages.rocm-device-libs: 5.7.0 -> 5.7.1 rocmPackages.rocm-runtime: 5.7.0 -> 5.7.1 rocmPackages.rocm-smi: 5.7.0 -> 5.7.1 rocmPackages.rocm-thunk: 5.7.0 -> 5.7.1 rocmPackages.rocminfo: 5.7.0 -> 5.7.1 rocmPackages.rocmlir: 5.7.0 -> 5.7.1 rocmPackages.rocdbgapi: 5.7.0 -> 5.7.1 rocmPackages.rocprim: 5.7.0 -> 5.7.1 rocmPackages.rocr-debug-agent: 5.7.0 -> 5.7.1 rocmPackages.rocsolver: 5.7.0 -> 5.7.1 rocmPackages.rocm-docs-core: 0.25.0 -> 0.26.0 rocmPackages.rocthrust: 5.7.0 -> 5.7.1 rocmPackages.rocprofiler: 5.7.0 -> 5.7.1 rocmPackages.roctracer: 5.7.0 -> 5.7.1 rocmPackages.rocsparse: 5.7.0 -> 5.7.1 rocmPackages.rpp: 5.7.0 -> 5.7.1 rocmPackages.tensile: 5.7.0 -> 5.7.1 rocmPackages.rocwmma: 5.7.0 -> 5.7.1 rocmPackages.clr: 5.7.0 -> 5.7.1 --- pkgs/development/rocm-modules/5/clang-ocl/default.nix | 2 +- pkgs/development/rocm-modules/5/clr/default.nix | 4 ++-- pkgs/development/rocm-modules/5/composable_kernel/default.nix | 2 +- pkgs/development/rocm-modules/5/half/default.nix | 2 +- pkgs/development/rocm-modules/5/hip-common/default.nix | 2 +- pkgs/development/rocm-modules/5/hipblas/default.nix | 2 +- pkgs/development/rocm-modules/5/hipcc/default.nix | 2 +- pkgs/development/rocm-modules/5/hipcub/default.nix | 2 +- pkgs/development/rocm-modules/5/hipfft/default.nix | 2 +- pkgs/development/rocm-modules/5/hipfort/default.nix | 2 +- pkgs/development/rocm-modules/5/hipify/default.nix | 2 +- pkgs/development/rocm-modules/5/hipsolver/default.nix | 4 ++-- pkgs/development/rocm-modules/5/hipsparse/default.nix | 2 +- pkgs/development/rocm-modules/5/llvm/base.nix | 4 ++-- pkgs/development/rocm-modules/5/migraphx/default.nix | 4 ++-- pkgs/development/rocm-modules/5/miopen/default.nix | 2 +- pkgs/development/rocm-modules/5/mivisionx/default.nix | 4 ++-- pkgs/development/rocm-modules/5/rccl/default.nix | 4 ++-- pkgs/development/rocm-modules/5/rdc/default.nix | 2 +- pkgs/development/rocm-modules/5/rocalution/default.nix | 2 +- pkgs/development/rocm-modules/5/rocblas/default.nix | 2 +- pkgs/development/rocm-modules/5/rocdbgapi/default.nix | 2 +- pkgs/development/rocm-modules/5/rocfft/default.nix | 2 +- pkgs/development/rocm-modules/5/rocgdb/default.nix | 2 +- pkgs/development/rocm-modules/5/rocm-cmake/default.nix | 2 +- pkgs/development/rocm-modules/5/rocm-comgr/default.nix | 2 +- pkgs/development/rocm-modules/5/rocm-device-libs/default.nix | 4 ++-- pkgs/development/rocm-modules/5/rocm-docs-core/default.nix | 4 ++-- pkgs/development/rocm-modules/5/rocm-runtime/default.nix | 2 +- pkgs/development/rocm-modules/5/rocm-smi/default.nix | 4 ++-- pkgs/development/rocm-modules/5/rocm-thunk/default.nix | 2 +- pkgs/development/rocm-modules/5/rocminfo/default.nix | 2 +- pkgs/development/rocm-modules/5/rocmlir/default.nix | 2 +- pkgs/development/rocm-modules/5/rocprim/default.nix | 2 +- pkgs/development/rocm-modules/5/rocprofiler/default.nix | 4 ++-- pkgs/development/rocm-modules/5/rocr-debug-agent/default.nix | 2 +- pkgs/development/rocm-modules/5/rocrand/default.nix | 4 ++-- pkgs/development/rocm-modules/5/rocsolver/default.nix | 2 +- pkgs/development/rocm-modules/5/rocsparse/default.nix | 2 +- pkgs/development/rocm-modules/5/rocthrust/default.nix | 4 ++-- pkgs/development/rocm-modules/5/roctracer/default.nix | 2 +- pkgs/development/rocm-modules/5/rocwmma/default.nix | 4 ++-- pkgs/development/rocm-modules/5/rpp/default.nix | 2 +- pkgs/development/rocm-modules/5/tensile/default.nix | 2 +- 44 files changed, 57 insertions(+), 57 deletions(-) diff --git a/pkgs/development/rocm-modules/5/clang-ocl/default.nix b/pkgs/development/rocm-modules/5/clang-ocl/default.nix index 96fc4945747f..7af83bd2e132 100644 --- a/pkgs/development/rocm-modules/5/clang-ocl/default.nix +++ b/pkgs/development/rocm-modules/5/clang-ocl/default.nix @@ -9,7 +9,7 @@ stdenv.mkDerivation (finalAttrs: { pname = "clang-ocl"; - version = "5.7.0"; + version = "5.7.1"; src = fetchFromGitHub { owner = "RadeonOpenCompute"; diff --git a/pkgs/development/rocm-modules/5/clr/default.nix b/pkgs/development/rocm-modules/5/clr/default.nix index 5e4039586211..f12ef2bfc8b5 100644 --- a/pkgs/development/rocm-modules/5/clr/default.nix +++ b/pkgs/development/rocm-modules/5/clr/default.nix @@ -35,7 +35,7 @@ let ]; in stdenv.mkDerivation (finalAttrs: { pname = "clr"; - version = "5.7.0"; + version = "5.7.1"; outputs = [ "out" @@ -46,7 +46,7 @@ in stdenv.mkDerivation (finalAttrs: { owner = "ROCm-Developer-Tools"; repo = "clr"; rev = "rocm-${finalAttrs.version}"; - hash = "sha256-C+rFW/7kf35rz0sQTI2+iY5RhZZQY07fc5a+e6cB5OQ="; + hash = "sha256-1gZJhvBbUFdKH9p/7SRfzEV/fM+gIN2Qvlxf2VbmAIw="; }; nativeBuildInputs = [ diff --git a/pkgs/development/rocm-modules/5/composable_kernel/default.nix b/pkgs/development/rocm-modules/5/composable_kernel/default.nix index 2372b27ebe52..75039fc7d417 100644 --- a/pkgs/development/rocm-modules/5/composable_kernel/default.nix +++ b/pkgs/development/rocm-modules/5/composable_kernel/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation (finalAttrs: { pname = "composable_kernel"; - version = "5.7.0"; + version = "5.7.1"; outputs = [ "out" diff --git a/pkgs/development/rocm-modules/5/half/default.nix b/pkgs/development/rocm-modules/5/half/default.nix index 08c645848fa2..1ddd06b01449 100644 --- a/pkgs/development/rocm-modules/5/half/default.nix +++ b/pkgs/development/rocm-modules/5/half/default.nix @@ -8,7 +8,7 @@ stdenv.mkDerivation (finalAttrs: { pname = "half"; - version = "5.7.0"; + version = "5.7.1"; src = fetchFromGitHub { owner = "ROCmSoftwarePlatform"; diff --git a/pkgs/development/rocm-modules/5/hip-common/default.nix b/pkgs/development/rocm-modules/5/hip-common/default.nix index 9f5f37511ef0..6e2f950c0193 100644 --- a/pkgs/development/rocm-modules/5/hip-common/default.nix +++ b/pkgs/development/rocm-modules/5/hip-common/default.nix @@ -6,7 +6,7 @@ stdenv.mkDerivation (finalAttrs: { pname = "hip-common"; - version = "5.7.0"; + version = "5.7.1"; src = fetchFromGitHub { owner = "ROCm-Developer-Tools"; diff --git a/pkgs/development/rocm-modules/5/hipblas/default.nix b/pkgs/development/rocm-modules/5/hipblas/default.nix index b2206c737b00..c604dda46593 100644 --- a/pkgs/development/rocm-modules/5/hipblas/default.nix +++ b/pkgs/development/rocm-modules/5/hipblas/default.nix @@ -18,7 +18,7 @@ # Can also use cuBLAS stdenv.mkDerivation (finalAttrs: { pname = "hipblas"; - version = "5.7.0"; + version = "5.7.1"; outputs = [ "out" diff --git a/pkgs/development/rocm-modules/5/hipcc/default.nix b/pkgs/development/rocm-modules/5/hipcc/default.nix index e6610e8909f7..20c428bbf809 100644 --- a/pkgs/development/rocm-modules/5/hipcc/default.nix +++ b/pkgs/development/rocm-modules/5/hipcc/default.nix @@ -8,7 +8,7 @@ stdenv.mkDerivation (finalAttrs: { pname = "hipcc"; - version = "5.7.0"; + version = "5.7.1"; src = fetchFromGitHub { owner = "ROCm-Developer-Tools"; diff --git a/pkgs/development/rocm-modules/5/hipcub/default.nix b/pkgs/development/rocm-modules/5/hipcub/default.nix index 447c2c4174af..943a14c379a1 100644 --- a/pkgs/development/rocm-modules/5/hipcub/default.nix +++ b/pkgs/development/rocm-modules/5/hipcub/default.nix @@ -16,7 +16,7 @@ # CUB can also be used as a backend instead of rocPRIM. stdenv.mkDerivation (finalAttrs: { pname = "hipcub"; - version = "5.7.0"; + version = "5.7.1"; outputs = [ "out" diff --git a/pkgs/development/rocm-modules/5/hipfft/default.nix b/pkgs/development/rocm-modules/5/hipfft/default.nix index 153a7c8c18cc..b0c5928a192d 100644 --- a/pkgs/development/rocm-modules/5/hipfft/default.nix +++ b/pkgs/development/rocm-modules/5/hipfft/default.nix @@ -21,7 +21,7 @@ # Can also use cuFFT stdenv.mkDerivation (finalAttrs: { pname = "hipfft"; - version = "5.7.0"; + version = "5.7.1"; outputs = [ "out" diff --git a/pkgs/development/rocm-modules/5/hipfort/default.nix b/pkgs/development/rocm-modules/5/hipfort/default.nix index 4bb2a270271b..4b6c7c56af41 100644 --- a/pkgs/development/rocm-modules/5/hipfort/default.nix +++ b/pkgs/development/rocm-modules/5/hipfort/default.nix @@ -9,7 +9,7 @@ stdenv.mkDerivation (finalAttrs: { pname = "hipfort"; - version = "5.7.0"; + version = "5.7.1"; src = fetchFromGitHub { owner = "ROCmSoftwarePlatform"; diff --git a/pkgs/development/rocm-modules/5/hipify/default.nix b/pkgs/development/rocm-modules/5/hipify/default.nix index 893056496c9c..e553c0e385a5 100644 --- a/pkgs/development/rocm-modules/5/hipify/default.nix +++ b/pkgs/development/rocm-modules/5/hipify/default.nix @@ -9,7 +9,7 @@ stdenv.mkDerivation (finalAttrs: { pname = "hipify"; - version = "5.7.0"; + version = "5.7.1"; src = fetchFromGitHub { owner = "ROCm-Developer-Tools"; diff --git a/pkgs/development/rocm-modules/5/hipsolver/default.nix b/pkgs/development/rocm-modules/5/hipsolver/default.nix index 34592a5bbd96..9c5c1cad2207 100644 --- a/pkgs/development/rocm-modules/5/hipsolver/default.nix +++ b/pkgs/development/rocm-modules/5/hipsolver/default.nix @@ -18,7 +18,7 @@ # Can also use cuSOLVER stdenv.mkDerivation (finalAttrs: { pname = "hipsolver"; - version = "5.7.0"; + version = "5.7.1"; outputs = [ "out" @@ -34,7 +34,7 @@ stdenv.mkDerivation (finalAttrs: { owner = "ROCmSoftwarePlatform"; repo = "hipSOLVER"; rev = "rocm-${finalAttrs.version}"; - hash = "sha256-I9Xjkilo+baeM1CRXjLAbj/vrg8r5/E2yEImhHGSyf8="; + hash = "sha256-5b6kPj9yvXvP7f7AyHDTYRoM/EhQZvwkVCfDflFJugc="; }; nativeBuildInputs = [ diff --git a/pkgs/development/rocm-modules/5/hipsparse/default.nix b/pkgs/development/rocm-modules/5/hipsparse/default.nix index 79b78f3661d8..0e77079348b3 100644 --- a/pkgs/development/rocm-modules/5/hipsparse/default.nix +++ b/pkgs/development/rocm-modules/5/hipsparse/default.nix @@ -18,7 +18,7 @@ # This can also use cuSPARSE as a backend instead of rocSPARSE stdenv.mkDerivation (finalAttrs: { pname = "hipsparse"; - version = "5.7.0"; + version = "5.7.1"; outputs = [ "out" diff --git a/pkgs/development/rocm-modules/5/llvm/base.nix b/pkgs/development/rocm-modules/5/llvm/base.nix index 655192d892bb..82de9e6f3665 100644 --- a/pkgs/development/rocm-modules/5/llvm/base.nix +++ b/pkgs/development/rocm-modules/5/llvm/base.nix @@ -53,7 +53,7 @@ let llvmTargetsToBuild' = [ "AMDGPU" ] ++ builtins.map inferNativeTarget llvmTargetsToBuild; in stdenv.mkDerivation (finalAttrs: { pname = "rocm-llvm-${targetName}"; - version = "5.7.0"; + version = "5.7.1"; outputs = [ "out" @@ -70,7 +70,7 @@ in stdenv.mkDerivation (finalAttrs: { owner = "RadeonOpenCompute"; repo = "llvm-project"; rev = "rocm-${finalAttrs.version}"; - hash = "sha256-oJIXALwxo130jl8b6yCFw+a2kMBlny5/0ubiqF6MOWY="; + hash = "sha256-0+lJnDiMntxCYbZBCSWvHOcKXexFfEzRfb49QbfOmK8="; }; nativeBuildInputs = [ diff --git a/pkgs/development/rocm-modules/5/migraphx/default.nix b/pkgs/development/rocm-modules/5/migraphx/default.nix index 5842cd1695d5..dc84e526823f 100644 --- a/pkgs/development/rocm-modules/5/migraphx/default.nix +++ b/pkgs/development/rocm-modules/5/migraphx/default.nix @@ -49,7 +49,7 @@ let }; in stdenv.mkDerivation (finalAttrs: { pname = "migraphx"; - version = "5.7.0"; + version = "5.7.1"; outputs = [ "out" @@ -63,7 +63,7 @@ in stdenv.mkDerivation (finalAttrs: { owner = "ROCmSoftwarePlatform"; repo = "AMDMIGraphX"; rev = "rocm-${finalAttrs.version}"; - hash = "sha256-7yL7Zn5I8GUPIAgB7tVLZI7OEHLv0E4FcLVx9xMfsNY="; + hash = "sha256-lg3pxHBpwqxBvdOQgE44YKLuumhkVF6b3Xx4+cw7jNQ="; }; nativeBuildInputs = [ diff --git a/pkgs/development/rocm-modules/5/miopen/default.nix b/pkgs/development/rocm-modules/5/miopen/default.nix index d22518aa51c6..a9a1cd5abe01 100644 --- a/pkgs/development/rocm-modules/5/miopen/default.nix +++ b/pkgs/development/rocm-modules/5/miopen/default.nix @@ -35,7 +35,7 @@ }: let - version = "5.7.0"; + version = "5.7.1"; src = fetchFromGitHub { owner = "ROCmSoftwarePlatform"; diff --git a/pkgs/development/rocm-modules/5/mivisionx/default.nix b/pkgs/development/rocm-modules/5/mivisionx/default.nix index d6e198eb4c77..7eac2a4ca497 100644 --- a/pkgs/development/rocm-modules/5/mivisionx/default.nix +++ b/pkgs/development/rocm-modules/5/mivisionx/default.nix @@ -38,13 +38,13 @@ stdenv.mkDerivation (finalAttrs: { else "cpu" ); - version = "5.7.0"; + version = "5.7.1"; src = fetchFromGitHub { owner = "GPUOpen-ProfessionalCompute-Libraries"; repo = "MIVisionX"; rev = "rocm-${finalAttrs.version}"; - hash = "sha256-Z7UIqJWuSD+/FoZ1VIbITp4R/bwaqFCQqsL8CRW73Ek="; + hash = "sha256-jmOgwESNALQt7ctmUY9JHgKq47tCwsW1ybynkX9236U="; }; nativeBuildInputs = [ diff --git a/pkgs/development/rocm-modules/5/rccl/default.nix b/pkgs/development/rocm-modules/5/rccl/default.nix index d4045252bae4..3f011d3fdfac 100644 --- a/pkgs/development/rocm-modules/5/rccl/default.nix +++ b/pkgs/development/rocm-modules/5/rccl/default.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation (finalAttrs: { pname = "rccl"; - version = "5.7.0"; + version = "5.7.1"; outputs = [ "out" @@ -28,7 +28,7 @@ stdenv.mkDerivation (finalAttrs: { owner = "ROCmSoftwarePlatform"; repo = "rccl"; rev = "rocm-${finalAttrs.version}"; - hash = "sha256-Abrwmsjnkx9JVTrARP/BM965g+R10lY+XPwthy/SG0k="; + hash = "sha256-nFkou/kjGBmImorlPOZNTlCrxbfAYpDhgRveyoAufu8="; }; nativeBuildInputs = [ diff --git a/pkgs/development/rocm-modules/5/rdc/default.nix b/pkgs/development/rocm-modules/5/rdc/default.nix index 134b946c5f7a..abdd121bce3c 100644 --- a/pkgs/development/rocm-modules/5/rdc/default.nix +++ b/pkgs/development/rocm-modules/5/rdc/default.nix @@ -41,7 +41,7 @@ let }; in stdenv.mkDerivation (finalAttrs: { pname = "rdc"; - version = "5.7.0"; + version = "5.7.1"; outputs = [ "out" diff --git a/pkgs/development/rocm-modules/5/rocalution/default.nix b/pkgs/development/rocm-modules/5/rocalution/default.nix index 80fd655557df..2a0e149bb3e9 100644 --- a/pkgs/development/rocm-modules/5/rocalution/default.nix +++ b/pkgs/development/rocm-modules/5/rocalution/default.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation (finalAttrs: { pname = "rocalution"; - version = "5.7.0"; + version = "5.7.1"; outputs = [ "out" diff --git a/pkgs/development/rocm-modules/5/rocblas/default.nix b/pkgs/development/rocm-modules/5/rocblas/default.nix index 17732fd51681..ca6a9e6e723a 100644 --- a/pkgs/development/rocm-modules/5/rocblas/default.nix +++ b/pkgs/development/rocm-modules/5/rocblas/default.nix @@ -73,7 +73,7 @@ let fallbacks = rocblas.overrideAttrs { pname = "rocblas-tensile-fallbacks"; }; in stdenv.mkDerivation (finalAttrs: { pname = "rocblas"; - version = "5.7.0"; + version = "5.7.1"; outputs = [ "out" diff --git a/pkgs/development/rocm-modules/5/rocdbgapi/default.nix b/pkgs/development/rocm-modules/5/rocdbgapi/default.nix index 41c1178f1089..aef89d2330d1 100644 --- a/pkgs/development/rocm-modules/5/rocdbgapi/default.nix +++ b/pkgs/development/rocm-modules/5/rocdbgapi/default.nix @@ -38,7 +38,7 @@ let }; in stdenv.mkDerivation (finalAttrs: { pname = "rocdbgapi"; - version = "5.7.0"; + version = "5.7.1"; outputs = [ "out" diff --git a/pkgs/development/rocm-modules/5/rocfft/default.nix b/pkgs/development/rocm-modules/5/rocfft/default.nix index ac50318622ce..309a7f2fe224 100644 --- a/pkgs/development/rocm-modules/5/rocfft/default.nix +++ b/pkgs/development/rocm-modules/5/rocfft/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation (finalAttrs: { pname = "rocfft"; - version = "5.7.0"; + version = "5.7.1"; src = fetchFromGitHub { owner = "ROCmSoftwarePlatform"; diff --git a/pkgs/development/rocm-modules/5/rocgdb/default.nix b/pkgs/development/rocm-modules/5/rocgdb/default.nix index a2f4435ee7bc..facec0cf16d3 100644 --- a/pkgs/development/rocm-modules/5/rocgdb/default.nix +++ b/pkgs/development/rocm-modules/5/rocgdb/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation (finalAttrs: { pname = "rocgdb"; - version = "5.7.0"; + version = "5.7.1"; src = fetchFromGitHub { owner = "ROCm-Developer-Tools"; diff --git a/pkgs/development/rocm-modules/5/rocm-cmake/default.nix b/pkgs/development/rocm-modules/5/rocm-cmake/default.nix index 9e9cf3caf12e..d88912154f8b 100644 --- a/pkgs/development/rocm-modules/5/rocm-cmake/default.nix +++ b/pkgs/development/rocm-modules/5/rocm-cmake/default.nix @@ -7,7 +7,7 @@ stdenv.mkDerivation (finalAttrs: { pname = "rocm-cmake"; - version = "5.7.0"; + version = "5.7.1"; src = fetchFromGitHub { owner = "RadeonOpenCompute"; diff --git a/pkgs/development/rocm-modules/5/rocm-comgr/default.nix b/pkgs/development/rocm-modules/5/rocm-comgr/default.nix index c3c4c5fab3cd..8411c4d53cb3 100644 --- a/pkgs/development/rocm-modules/5/rocm-comgr/default.nix +++ b/pkgs/development/rocm-modules/5/rocm-comgr/default.nix @@ -15,7 +15,7 @@ let else throw "Unsupported ROCm LLVM platform"; in stdenv.mkDerivation (finalAttrs: { pname = "rocm-comgr"; - version = "5.7.0"; + version = "5.7.1"; src = fetchFromGitHub { owner = "RadeonOpenCompute"; diff --git a/pkgs/development/rocm-modules/5/rocm-device-libs/default.nix b/pkgs/development/rocm-modules/5/rocm-device-libs/default.nix index 594e21031284..844f38a9a4b2 100644 --- a/pkgs/development/rocm-modules/5/rocm-device-libs/default.nix +++ b/pkgs/development/rocm-modules/5/rocm-device-libs/default.nix @@ -14,13 +14,13 @@ let else throw "Unsupported ROCm LLVM platform"; in stdenv.mkDerivation (finalAttrs: { pname = "rocm-device-libs"; - version = "5.7.0"; + version = "5.7.1"; src = fetchFromGitHub { owner = "RadeonOpenCompute"; repo = "ROCm-Device-Libs"; rev = "rocm-${finalAttrs.version}"; - hash = "sha256-f6/LAhJ2mBDO1/JloHvl7MJyDo3WutbXd4IDknA9nzM="; + hash = "sha256-ARxs/yqyVoIUWliJkINzitumF+64/5u3fbB0tHB5hPU="; }; patches = [ ./cmake.patch ]; diff --git a/pkgs/development/rocm-modules/5/rocm-docs-core/default.nix b/pkgs/development/rocm-modules/5/rocm-docs-core/default.nix index 65d21daa5b50..220e89fe71d2 100644 --- a/pkgs/development/rocm-modules/5/rocm-docs-core/default.nix +++ b/pkgs/development/rocm-modules/5/rocm-docs-core/default.nix @@ -22,14 +22,14 @@ buildPythonPackage rec { pname = "rocm-docs-core"; - version = "0.25.0"; + version = "0.26.0"; format = "pyproject"; src = fetchFromGitHub { owner = "RadeonOpenCompute"; repo = "rocm-docs-core"; rev = "v${version}"; - hash = "sha256-kOsoIK0vaPT60hGr960s5vc0eloSr5CECtd8Dy24YuM="; + hash = "sha256-Mr6/Ne6P+TapoCqN7xkKMNse3fTaIAvvLmMl0kVg7Vs="; }; buildInputs = [ setuptools ]; diff --git a/pkgs/development/rocm-modules/5/rocm-runtime/default.nix b/pkgs/development/rocm-modules/5/rocm-runtime/default.nix index fd9182c8254d..79174c7032f0 100644 --- a/pkgs/development/rocm-modules/5/rocm-runtime/default.nix +++ b/pkgs/development/rocm-modules/5/rocm-runtime/default.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation (finalAttrs: { pname = "rocm-runtime"; - version = "5.7.0"; + version = "5.7.1"; src = fetchFromGitHub { owner = "RadeonOpenCompute"; diff --git a/pkgs/development/rocm-modules/5/rocm-smi/default.nix b/pkgs/development/rocm-modules/5/rocm-smi/default.nix index 2e1692539e23..66c1c765c13f 100644 --- a/pkgs/development/rocm-modules/5/rocm-smi/default.nix +++ b/pkgs/development/rocm-modules/5/rocm-smi/default.nix @@ -8,13 +8,13 @@ stdenv.mkDerivation (finalAttrs: { pname = "rocm-smi"; - version = "5.7.0"; + version = "5.7.1"; src = fetchFromGitHub { owner = "RadeonOpenCompute"; repo = "rocm_smi_lib"; rev = "rocm-${finalAttrs.version}"; - hash = "sha256-swCRO4PBMBJ6fO2bLq/xxFZIYw2IgiFB490wsU8Wm2o="; + hash = "sha256-NZR4jBgKVfpkRNQFPmav1yCZF872LkcrPBNNcBVTLDU="; }; patches = [ ./cmake.patch ]; diff --git a/pkgs/development/rocm-modules/5/rocm-thunk/default.nix b/pkgs/development/rocm-modules/5/rocm-thunk/default.nix index 73368dbb0e7f..98fbc56517f9 100644 --- a/pkgs/development/rocm-modules/5/rocm-thunk/default.nix +++ b/pkgs/development/rocm-modules/5/rocm-thunk/default.nix @@ -10,7 +10,7 @@ stdenv.mkDerivation (finalAttrs: { pname = "rocm-thunk"; - version = "5.7.0"; + version = "5.7.1"; src = fetchFromGitHub { owner = "RadeonOpenCompute"; diff --git a/pkgs/development/rocm-modules/5/rocminfo/default.nix b/pkgs/development/rocm-modules/5/rocminfo/default.nix index c9ff79e380ff..c80dbc4aeacf 100644 --- a/pkgs/development/rocm-modules/5/rocminfo/default.nix +++ b/pkgs/development/rocm-modules/5/rocminfo/default.nix @@ -18,7 +18,7 @@ }: stdenv.mkDerivation (finalAttrs: { - version = "5.7.0"; + version = "5.7.1"; pname = "rocminfo"; src = fetchFromGitHub { diff --git a/pkgs/development/rocm-modules/5/rocmlir/default.nix b/pkgs/development/rocm-modules/5/rocmlir/default.nix index 9b24112dce8a..74fe00e781cc 100644 --- a/pkgs/development/rocm-modules/5/rocmlir/default.nix +++ b/pkgs/development/rocm-modules/5/rocmlir/default.nix @@ -32,7 +32,7 @@ let else throw "Unsupported ROCm LLVM platform"; in stdenv.mkDerivation (finalAttrs: { pname = "rocmlir${suffix}"; - version = "5.7.0"; + version = "5.7.1"; outputs = [ "out" diff --git a/pkgs/development/rocm-modules/5/rocprim/default.nix b/pkgs/development/rocm-modules/5/rocprim/default.nix index 1dd2555c6915..10d1f187ba73 100644 --- a/pkgs/development/rocm-modules/5/rocprim/default.nix +++ b/pkgs/development/rocm-modules/5/rocprim/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation (finalAttrs: { pname = "rocprim"; - version = "5.7.0"; + version = "5.7.1"; outputs = [ "out" diff --git a/pkgs/development/rocm-modules/5/rocprofiler/default.nix b/pkgs/development/rocm-modules/5/rocprofiler/default.nix index ec24a3f41e59..c77014b50cfd 100644 --- a/pkgs/development/rocm-modules/5/rocprofiler/default.nix +++ b/pkgs/development/rocm-modules/5/rocprofiler/default.nix @@ -33,13 +33,13 @@ stdenv.mkDerivation (finalAttrs: { pname = "rocprofiler"; - version = "5.7.0"; + version = "5.7.1"; src = fetchFromGitHub { owner = "ROCm-Developer-Tools"; repo = "rocprofiler"; rev = "rocm-${finalAttrs.version}"; - hash = "sha256-ue/2uiLbhOv/5XY4cIJuZ8DUMRhniYgxolq9xMwO1FY="; + hash = "sha256-1s/7C9y+73ADLF/17Vepw0pZNVtYnKoP24GdwKc9X2Y="; }; nativeBuildInputs = [ diff --git a/pkgs/development/rocm-modules/5/rocr-debug-agent/default.nix b/pkgs/development/rocm-modules/5/rocr-debug-agent/default.nix index dfc8580b3e14..6dd0ec45b3b6 100644 --- a/pkgs/development/rocm-modules/5/rocr-debug-agent/default.nix +++ b/pkgs/development/rocm-modules/5/rocr-debug-agent/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation (finalAttrs: { pname = "rocr-debug-agent"; - version = "5.7.0"; + version = "5.7.1"; src = fetchFromGitHub { owner = "ROCm-Developer-Tools"; diff --git a/pkgs/development/rocm-modules/5/rocrand/default.nix b/pkgs/development/rocm-modules/5/rocrand/default.nix index 954a299e317e..d61b95394cab 100644 --- a/pkgs/development/rocm-modules/5/rocrand/default.nix +++ b/pkgs/development/rocm-modules/5/rocrand/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation (finalAttrs: { pname = "rocrand"; - version = "5.7.0"; + version = "5.7.1"; outputs = [ "out" @@ -28,7 +28,7 @@ stdenv.mkDerivation (finalAttrs: { owner = "ROCmSoftwarePlatform"; repo = "rocRAND"; rev = "rocm-${finalAttrs.version}"; - hash = "sha256-cFH38fLD8tk6V9JERcqHokuwKemdDgHCZ75bZNEqmdY="; + hash = "sha256-VrpiHlZZQH+IOoaEDuDOfRgnMiqm1bpRIuNyrPz2SGY="; fetchSubmodules = true; # For inline hipRAND }; diff --git a/pkgs/development/rocm-modules/5/rocsolver/default.nix b/pkgs/development/rocm-modules/5/rocsolver/default.nix index 6490870ea48a..ade9c69e534e 100644 --- a/pkgs/development/rocm-modules/5/rocsolver/default.nix +++ b/pkgs/development/rocm-modules/5/rocsolver/default.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation (finalAttrs: { pname = "rocsolver"; - version = "5.7.0"; + version = "5.7.1"; outputs = [ "out" diff --git a/pkgs/development/rocm-modules/5/rocsparse/default.nix b/pkgs/development/rocm-modules/5/rocsparse/default.nix index 945e03c0bc8b..e19334df1514 100644 --- a/pkgs/development/rocm-modules/5/rocsparse/default.nix +++ b/pkgs/development/rocm-modules/5/rocsparse/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation (finalAttrs: { pname = "rocsparse"; - version = "5.7.0"; + version = "5.7.1"; outputs = [ "out" diff --git a/pkgs/development/rocm-modules/5/rocthrust/default.nix b/pkgs/development/rocm-modules/5/rocthrust/default.nix index b80b161f5799..4fe2e0828a16 100644 --- a/pkgs/development/rocm-modules/5/rocthrust/default.nix +++ b/pkgs/development/rocm-modules/5/rocthrust/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation (finalAttrs: { pname = "rocthrust"; - version = "5.7.0"; + version = "5.7.1"; outputs = [ "out" @@ -28,7 +28,7 @@ stdenv.mkDerivation (finalAttrs: { owner = "ROCmSoftwarePlatform"; repo = "rocThrust"; rev = "rocm-${finalAttrs.version}"; - hash = "sha256-i0XCtJth8caVQT5oUgsxWXNzcePa02Gb7AQsthYTOv8="; + hash = "sha256-+bcHcA87IToTcII7N/hm81C/JiokJKj0M1yAph/x9Qc="; }; nativeBuildInputs = [ diff --git a/pkgs/development/rocm-modules/5/roctracer/default.nix b/pkgs/development/rocm-modules/5/roctracer/default.nix index 92e557426b10..41491bc22345 100644 --- a/pkgs/development/rocm-modules/5/roctracer/default.nix +++ b/pkgs/development/rocm-modules/5/roctracer/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation (finalAttrs: { pname = "roctracer"; - version = "5.7.0"; + version = "5.7.1"; outputs = [ "out" diff --git a/pkgs/development/rocm-modules/5/rocwmma/default.nix b/pkgs/development/rocm-modules/5/rocwmma/default.nix index 71d0e3fbe793..e982e036c477 100644 --- a/pkgs/development/rocm-modules/5/rocwmma/default.nix +++ b/pkgs/development/rocm-modules/5/rocwmma/default.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation (finalAttrs: { pname = "rocwmma"; - version = "5.7.0"; + version = "5.7.1"; outputs = [ "out" @@ -34,7 +34,7 @@ stdenv.mkDerivation (finalAttrs: { owner = "ROCmSoftwarePlatform"; repo = "rocWMMA"; rev = "rocm-${finalAttrs.version}"; - hash = "sha256-/EuBBSjhlMwJfsqYvRb9oCNC0hNkEa1JH1KUDLMSs08="; + hash = "sha256-0otJxgVYLwvVYIWT/hjrrpuSj5jslP1dbJRt6GUOrDs="; }; patches = lib.optionals (buildTests || buildBenchmarks) [ diff --git a/pkgs/development/rocm-modules/5/rpp/default.nix b/pkgs/development/rocm-modules/5/rpp/default.nix index eee10f2ab7c8..a9456587ff3b 100644 --- a/pkgs/development/rocm-modules/5/rpp/default.nix +++ b/pkgs/development/rocm-modules/5/rpp/default.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation (finalAttrs: { else "cpu" ); - version = "5.7.0"; + version = "5.7.1"; src = fetchFromGitHub { owner = "GPUOpen-ProfessionalCompute-Libraries"; diff --git a/pkgs/development/rocm-modules/5/tensile/default.nix b/pkgs/development/rocm-modules/5/tensile/default.nix index 86dbaa95e192..fa111c056c5c 100644 --- a/pkgs/development/rocm-modules/5/tensile/default.nix +++ b/pkgs/development/rocm-modules/5/tensile/default.nix @@ -15,7 +15,7 @@ buildPythonPackage rec { pname = "tensile"; - version = "5.7.0"; + version = "5.7.1"; format = "pyproject"; src = fetchFromGitHub { From 6f3f5b64f2cb52294097f9b2b74762cb7776c95e Mon Sep 17 00:00:00 2001 From: Madoura Date: Tue, 17 Oct 2023 03:18:15 -0500 Subject: [PATCH 16/57] rocmPackages.roctracer: make roctracer free again --- pkgs/development/python-modules/torch/default.nix | 3 +-- pkgs/development/rocm-modules/5/default.nix | 3 +-- pkgs/development/rocm-modules/5/roctracer/default.nix | 6 ++---- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/pkgs/development/python-modules/torch/default.nix b/pkgs/development/python-modules/torch/default.nix index 65131548e5db..9dcb9c6c266c 100644 --- a/pkgs/development/python-modules/torch/default.nix +++ b/pkgs/development/python-modules/torch/default.nix @@ -95,8 +95,7 @@ let paths = with rocmPackages; [ rocm-core clr rccl miopen miopengemm rocrand rocblas - rocsparse hipsparse rocthrust rocprim hipcub - roctracer # Unfree at the moment due to hsa-amd-aqlprofile hard dependency in rocprofiler + rocsparse hipsparse rocthrust rocprim hipcub roctracer rocfft rocsolver hipfft hipsolver hipblas rocminfo rocm-thunk rocm-comgr rocm-device-libs rocm-runtime clr.icd hipify diff --git a/pkgs/development/rocm-modules/5/default.nix b/pkgs/development/rocm-modules/5/default.nix index 6e263998dbe6..3229d7b077a0 100644 --- a/pkgs/development/rocm-modules/5/default.nix +++ b/pkgs/development/rocm-modules/5/default.nix @@ -111,8 +111,7 @@ in rec { # Needs GCC roctracer = callPackage ./roctracer { - inherit rocmUpdateScript rocm-device-libs rocm-runtime rocprofiler clr; - inherit (llvm) clang; + inherit rocmUpdateScript rocm-device-libs rocm-runtime clr; }; # Needs GCC diff --git a/pkgs/development/rocm-modules/5/roctracer/default.nix b/pkgs/development/rocm-modules/5/roctracer/default.nix index 41491bc22345..7be3ea0f7505 100644 --- a/pkgs/development/rocm-modules/5/roctracer/default.nix +++ b/pkgs/development/rocm-modules/5/roctracer/default.nix @@ -3,14 +3,13 @@ , fetchFromGitHub , rocmUpdateScript , cmake -, clang , clr , rocm-device-libs -, rocprofiler , libxml2 , doxygen , graphviz , gcc-unwrapped +, libbacktrace , rocm-runtime , python3Packages , buildDocs ? false # Nothing seems to be generated, so not making the output @@ -38,7 +37,6 @@ stdenv.mkDerivation (finalAttrs: { nativeBuildInputs = [ cmake - clang clr ] ++ lib.optionals buildDocs [ doxygen @@ -46,8 +44,8 @@ stdenv.mkDerivation (finalAttrs: { ]; buildInputs = [ - rocprofiler libxml2 + libbacktrace python3Packages.python python3Packages.cppheaderparser ]; From 68766ab4a884bcfb52e5a2b05a8bb812142423a7 Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Wed, 18 Oct 2023 23:48:09 +0200 Subject: [PATCH 17/57] dbus-cpp: Fix pkg-config file lomiri.mediascanner2 errored due to includedir being a non-existent path. TIL our pkg-config patcher requires ${prefix} to work. --- pkgs/by-name/db/dbus-cpp/package.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/by-name/db/dbus-cpp/package.nix b/pkgs/by-name/db/dbus-cpp/package.nix index 6ad4c355b6ad..2e834111c9d9 100644 --- a/pkgs/by-name/db/dbus-cpp/package.nix +++ b/pkgs/by-name/db/dbus-cpp/package.nix @@ -60,6 +60,10 @@ stdenv.mkDerivation (finalAttrs: { # Warning on aarch64-linux breaks build due to -Werror substituteInPlace CMakeLists.txt \ --replace '-Werror' "" + + # pkg-config output patching hook expects prefix variable here + substituteInPlace data/dbus-cpp.pc.in \ + --replace 'includedir=''${exec_prefix}' 'includedir=''${prefix}' '' + lib.optionalString (!finalAttrs.doCheck) '' sed -i -e '/add_subdirectory(tests)/d' CMakeLists.txt ''; From 78d87ea07ce5990de7ad3a004465dc9e4bfe7bc3 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Thu, 19 Oct 2023 04:17:09 +0000 Subject: [PATCH 18/57] ryujinx: 1.1.1044 -> 1.1.1053 --- pkgs/applications/emulators/ryujinx/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/emulators/ryujinx/default.nix b/pkgs/applications/emulators/ryujinx/default.nix index 892e6faaa94c..f4fe6f467abf 100644 --- a/pkgs/applications/emulators/ryujinx/default.nix +++ b/pkgs/applications/emulators/ryujinx/default.nix @@ -28,13 +28,13 @@ buildDotnetModule rec { pname = "ryujinx"; - version = "1.1.1044"; # Based off of the official github actions builds: https://github.com/Ryujinx/Ryujinx/actions/workflows/release.yml + version = "1.1.1053"; # Based off of the official github actions builds: https://github.com/Ryujinx/Ryujinx/actions/workflows/release.yml src = fetchFromGitHub { owner = "Ryujinx"; repo = "Ryujinx"; - rev = "7afae8c69947f7a5fa9a55cee36381aef372dfba"; - sha256 = "1kf95sbb4p50b6bah75sd95660kk2a7cbjwgvqv4c4cal6c126g7"; + rev = "28dd7d80af56701887dbb538b56aa58edaf39d91"; + sha256 = "09h4423z18q8r8fqcd5kv34iwmy9gkmpgw8an8myrhhvkmxi3zwg"; }; dotnet-sdk = dotnetCorePackages.sdk_7_0; From dae0fd5fa0cf06f17715bb8e49790b81a3a44a22 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Thu, 19 Oct 2023 20:58:29 +0000 Subject: [PATCH 19/57] stm32cubemx: 6.9.1 -> 6.9.2 --- pkgs/development/embedded/stm32/stm32cubemx/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/embedded/stm32/stm32cubemx/default.nix b/pkgs/development/embedded/stm32/stm32cubemx/default.nix index a9384d9b2b8b..e3e0f2672cf2 100644 --- a/pkgs/development/embedded/stm32/stm32cubemx/default.nix +++ b/pkgs/development/embedded/stm32/stm32cubemx/default.nix @@ -13,11 +13,11 @@ let in stdenv.mkDerivation rec { pname = "stm32cubemx"; - version = "6.9.1"; + version = "6.9.2"; src = fetchzip { url = "https://sw-center.st.com/packs/resource/library/stm32cube_mx_v${builtins.replaceStrings ["."] [""] version}-lin.zip"; - sha256 = "sha256-KTbIRj7DkWoC2h/TLKjVduvsKVSue28kGOL34JqBVx4="; + sha256 = "sha256-x3ZRMtTvFGz2/0gJMx4zOx9rSnrSkCEl3pj5raeyVHg="; stripRoot = false; }; From 424b94c7d56b285063516a6be4b9a335c7ecabcd Mon Sep 17 00:00:00 2001 From: The Galaxy Date: Fri, 20 Oct 2023 22:08:49 +0800 Subject: [PATCH 20/57] maintainers: add galaxy --- maintainers/maintainer-list.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 87687572f3f0..9d8297a0b234 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -6190,6 +6190,16 @@ githubId = 45048741; name = "Alwanga Oyango"; }; + galaxy = { + email = "galaxy@dmc.chat"; + matrix = "@galaxy:mozilla.org"; + name = "The Galaxy"; + github = "ga1aksy"; + githubId = 148551648; + keys = [{ + fingerprint = "48CA 3873 9E9F CA8E 76A0 835A E3DE CF85 4212 E1EA"; + }]; + }; gal_bolle = { email = "florent.becker@ens-lyon.org"; github = "FlorentBecker"; From 479739b03e5cad880eb3e1416a7db77d64b8d658 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Fri, 20 Oct 2023 17:44:28 +0200 Subject: [PATCH 21/57] nginxModules.zstd: 25d88c262be47462cf90015ee7ebf6317b6848f9 -> 0.1.0 --- pkgs/servers/http/nginx/modules.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/http/nginx/modules.nix b/pkgs/servers/http/nginx/modules.nix index 13c8bd7e7c75..2ffb65a3a9f1 100644 --- a/pkgs/servers/http/nginx/modules.nix +++ b/pkgs/servers/http/nginx/modules.nix @@ -1022,8 +1022,8 @@ let self = { name = "zstd"; owner = "tokers"; repo = "zstd-nginx-module"; - rev = "25d88c262be47462cf90015ee7ebf6317b6848f9"; - sha256 = "sha256-YRluKekhx1tb6e5IL1FPK05jPtzfQPaHI47cdada928="; + rev = "0.1.0"; + hash = "sha256-8SBU9hJnKtNrwbpioy+Z/mfiVuqAx+U1t64m5tfEy6o="; }; inputs = [ zstd ]; From 9d193512a7cb020c8a16e275f95347706df0d56b Mon Sep 17 00:00:00 2001 From: Tomkoid Date: Thu, 19 Oct 2023 07:36:00 +0200 Subject: [PATCH 22/57] maintainers: add tomkoid --- maintainers/maintainer-list.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index c8b31eccbea3..096be9dc8cc8 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -17745,6 +17745,10 @@ githubId = 13155277; name = "Tom Houle"; }; + tomkoid = { + email = "tomaszierl@outlook.com"; + name = "Tomkoid"; + }; tomodachi94 = { email = "tomodachi94+nixpkgs@protonmail.com"; matrix = "@tomodachi94:matrix.org"; From 3c85721e86962283ddf1a24e05b95a9ec64f46b7 Mon Sep 17 00:00:00 2001 From: Tomkoid Date: Tue, 17 Oct 2023 18:35:24 +0200 Subject: [PATCH 23/57] mdhtml: init at 0.2.2 --- pkgs/tools/text/mdhtml/default.nix | 28 ++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 30 insertions(+) create mode 100644 pkgs/tools/text/mdhtml/default.nix diff --git a/pkgs/tools/text/mdhtml/default.nix b/pkgs/tools/text/mdhtml/default.nix new file mode 100644 index 000000000000..b5d12e7b3dcf --- /dev/null +++ b/pkgs/tools/text/mdhtml/default.nix @@ -0,0 +1,28 @@ +{ lib +, buildGoModule +, fetchFromGitea +}: + +buildGoModule rec { + pname = "mdhtml"; + version = "0.2.2"; + + src = fetchFromGitea { + domain = "codeberg.org"; + owner = "Tomkoid"; + repo = pname; + rev = version; + hash = "sha256-893pqrrTftzKqPYZgukV/yx2gkukVZWDTgg7ufx1MsY="; + }; + + vendorHash = null; + + meta = with lib; { + description = "Really simple CLI Markdown to HTML converter with styling support"; + homepage = "https://codeberg.org/Tomkoid/mdhtml"; + license = licenses.mit; + changelog = "https://codeberg.org/Tomkoid/mdhtml/releases"; + maintainers = with maintainers; [ tomkoid ]; + mainProgram = "mdhtml"; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e8040cd4fad1..c3d369cfdd30 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -42084,4 +42084,6 @@ with pkgs; }; code-maat = callPackage ../development/tools/code-maat {}; + + mdhtml = callPackage ../tools/text/mdhtml { }; } From 63ecebe2a3ffe0aaa2c9b371d1bb52aee0aa6496 Mon Sep 17 00:00:00 2001 From: dadada Date: Sun, 9 Jul 2023 02:16:56 +0200 Subject: [PATCH 24/57] soft-serve: fix shell hook This adds bash to the PATH of soft-serve. This is required for the hooks to work, since they are implemented in bash. --- pkgs/servers/soft-serve/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/soft-serve/default.nix b/pkgs/servers/soft-serve/default.nix index 5072869c39b6..01a5ea9d6dd0 100644 --- a/pkgs/servers/soft-serve/default.nix +++ b/pkgs/servers/soft-serve/default.nix @@ -1,4 +1,4 @@ -{ lib, buildGoModule, fetchFromGitHub, makeWrapper, git }: +{ lib, buildGoModule, fetchFromGitHub, makeWrapper, git, bash }: buildGoModule rec { pname = "soft-serve"; @@ -20,8 +20,10 @@ buildGoModule rec { nativeBuildInputs = [ makeWrapper ]; postInstall = '' + # Soft-serve generates git-hooks at run-time. + # The scripts require git and bash inside the path. wrapProgram $out/bin/soft \ - --prefix PATH : "${lib.makeBinPath [ git ]}" + --prefix PATH : "${lib.makeBinPath [ git bash ]}" ''; meta = with lib; { From fb2ee503c162c5a3933c369abb44828d494d235a Mon Sep 17 00:00:00 2001 From: The Galaxy Date: Sat, 21 Oct 2023 07:35:34 +0800 Subject: [PATCH 25/57] konbucase: init at 4.1.1 --- pkgs/by-name/ko/konbucase/package.nix | 52 +++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 pkgs/by-name/ko/konbucase/package.nix diff --git a/pkgs/by-name/ko/konbucase/package.nix b/pkgs/by-name/ko/konbucase/package.nix new file mode 100644 index 000000000000..75876d990661 --- /dev/null +++ b/pkgs/by-name/ko/konbucase/package.nix @@ -0,0 +1,52 @@ +{ lib +, stdenv +, fetchFromGitHub +, meson +, ninja +, vala +, pkg-config +, wrapGAppsHook +, pantheon +, gtksourceview5 +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "konbucase"; + version = "4.1.1"; + + src = fetchFromGitHub { + owner = "ryonakano"; + repo = "konbucase"; + rev = finalAttrs.version; + hash = "sha256-g3EDa9EXymi6c8dRHFZYGEAT7k8M2TXUAzZVKTnLzyk="; + fetchSubmodules = true; + }; + + nativeBuildInputs = [ + meson + ninja + vala + pkg-config + wrapGAppsHook + ]; + + buildInputs = [ + pantheon.granite7 + gtksourceview5 + ]; + + postInstall = '' + mv $out/bin/com.github.ryonakano.konbucase $out/bin/konbucase + substituteInPlace $out/share/applications/com.github.ryonakano.konbucase.desktop \ + --replace 'Exec=com.github.ryonakano.konbucase' 'Exec=${placeholder "out"}/bin/konbucase' + ''; + + meta = with lib; { + homepage = "https://github.com/ryonakano/konbucase"; + description = "A case converting app suitable for coding or typing"; + license = licenses.gpl3Only; + maintainers = with maintainers; [ galaxy ]; + platforms = platforms.linux; + mainProgram = "konbucase"; + }; +}) From 190f3903bb70c1c7b6cfb89bb75b24824d6162ec Mon Sep 17 00:00:00 2001 From: illustris Date: Sat, 21 Oct 2023 08:37:13 +0530 Subject: [PATCH 26/57] hadoop: remove duplicate `finalAttrs` Co-authored-by: Peder Bergebakken Sundt --- .../networking/cluster/hadoop/containerExecutor.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/networking/cluster/hadoop/containerExecutor.nix b/pkgs/applications/networking/cluster/hadoop/containerExecutor.nix index 83f2fe971d41..7d5d2918e9b9 100644 --- a/pkgs/applications/networking/cluster/hadoop/containerExecutor.nix +++ b/pkgs/applications/networking/cluster/hadoop/containerExecutor.nix @@ -5,7 +5,7 @@ stdenv.mkDerivation (finalAttrs: { inherit version; src = fetchurl { - url = with finalAttrs; "mirror://apache/hadoop/common/hadoop-${finalAttrs.version}/hadoop-${finalAttrs.version}-src.tar.gz"; + url = "mirror://apache/hadoop/common/hadoop-${finalAttrs.version}/hadoop-${finalAttrs.version}-src.tar.gz"; hash = platformAttrs.${stdenv.system}.srcHash; }; sourceRoot = "hadoop-${finalAttrs.version}-src/hadoop-yarn-project/hadoop-yarn/" From 5ed19a8d2ad73db58d84f51d474abce96ee3fd96 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sat, 21 Oct 2023 07:57:40 +0000 Subject: [PATCH 27/57] cloudfoundry-cli: 8.7.3 -> 8.7.4 --- .../networking/cluster/cloudfoundry-cli/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/networking/cluster/cloudfoundry-cli/default.nix b/pkgs/applications/networking/cluster/cloudfoundry-cli/default.nix index 0371e8c813bd..2204a9405027 100644 --- a/pkgs/applications/networking/cluster/cloudfoundry-cli/default.nix +++ b/pkgs/applications/networking/cluster/cloudfoundry-cli/default.nix @@ -2,15 +2,15 @@ buildGoModule rec { pname = "cloudfoundry-cli"; - version = "8.7.3"; + version = "8.7.4"; src = fetchFromGitHub { owner = "cloudfoundry"; repo = "cli"; rev = "v${version}"; - sha256 = "sha256-2ABsxoGRRUfa09tVPmn1IXDR2IXIewg/b/fmQnaKLoY="; + sha256 = "sha256-W4+2ugRSSP3HgmyQJKGCPMX7cmE7Fk3iovBOgBen+q8="; }; - vendorHash = "sha256-k2NI9zyeQM4PJo2wE3WkG5sntJGISwmz4xqQVChu8WQ="; + vendorHash = "sha256-klbKL/c7L7kHPadDa/FkpuAgHYQmuLQK6yFhph52KsU="; subPackages = [ "." ]; From eeb3936722e6f31ed8e292762be1bc6645cf6c27 Mon Sep 17 00:00:00 2001 From: hacker1024 Date: Sat, 21 Oct 2023 21:54:21 +1100 Subject: [PATCH 28/57] buildDartApplication: Format with nixpkgs-fmt --- .../dart/build-dart-application/default.nix | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/pkgs/build-support/dart/build-dart-application/default.nix b/pkgs/build-support/dart/build-dart-application/default.nix index be1fd7277671..b2535123e382 100644 --- a/pkgs/build-support/dart/build-dart-application/default.nix +++ b/pkgs/build-support/dart/build-dart-application/default.nix @@ -18,11 +18,10 @@ , dartEntryPoints ? null # Used when wrapping aot, jit, kernel, and js builds. # Set to null to disable wrapping. -, dartRuntimeCommand ? - if dartOutputType == "aot-snapshot" then "${dart}/bin/dartaotruntime" - else if (dartOutputType == "jit-snapshot" || dartOutputType == "kernel") then "${dart}/bin/dart" - else if dartOutputType == "js" then "${nodejs}/bin/node" - else null +, dartRuntimeCommand ? if dartOutputType == "aot-snapshot" then "${dart}/bin/dartaotruntime" + else if (dartOutputType == "jit-snapshot" || dartOutputType == "kernel") then "${dart}/bin/dart" + else if dartOutputType == "js" then "${nodejs}/bin/node" + else null , pubspecLockFile ? null , vendorHash ? "" @@ -43,15 +42,15 @@ let inherit (dartHooks.override { inherit dart; }) dartConfigHook dartBuildHook dartInstallHook; in assert !(builtins.isString dartOutputType && dartOutputType != "") -> - throw "dartOutputType must be a non-empty string"; +throw "dartOutputType must be a non-empty string"; stdenv.mkDerivation (args // { inherit pubGetScript dartCompileCommand dartOutputType dartRuntimeCommand dartCompileFlags dartJitFlags; - dartEntryPoints = - if (dartEntryPoints != null) - then writeText "entrypoints.json" (builtins.toJSON dartEntryPoints) - else null; + dartEntryPoints = + if (dartEntryPoints != null) + then writeText "entrypoints.json" (builtins.toJSON dartEntryPoints) + else null; nativeBuildInputs = (args.nativeBuildInputs or [ ]) ++ [ dart From 64c638bfc07d05370c7f5a3833b5871f4210ef6e Mon Sep 17 00:00:00 2001 From: hacker1024 Date: Sat, 21 Oct 2023 22:02:30 +1100 Subject: [PATCH 29/57] fetchDartDeps: Disable install phase in depsListDrv --- pkgs/build-support/dart/fetch-dart-deps/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/build-support/dart/fetch-dart-deps/default.nix b/pkgs/build-support/dart/fetch-dart-deps/default.nix index e523b60797eb..51052cae18f4 100644 --- a/pkgs/build-support/dart/fetch-dart-deps/default.nix +++ b/pkgs/build-support/dart/fetch-dart-deps/default.nix @@ -169,6 +169,8 @@ let dart pub deps --json | jq .packages > $out runHook postBuild ''; + + dontInstall = true; } // (removeAttrs buildDrvInheritArgs [ "name" "pname" ])); # As of Dart 3.0.0, Pub checks the revision of cached Git-sourced packages. From 234b63b0f0668770f9136eb06c718787aed4d342 Mon Sep 17 00:00:00 2001 From: hacker1024 Date: Sat, 21 Oct 2023 22:00:54 +1100 Subject: [PATCH 30/57] buildDartApplication: Allow supplying runtime dependencies --- .../dart/build-dart-application/default.nix | 8 +++++-- .../hooks/dart-fixup-hook.sh | 21 +++++++++++++++++++ .../build-dart-application/hooks/default.nix | 3 +++ 3 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 pkgs/build-support/dart/build-dart-application/hooks/dart-fixup-hook.sh diff --git a/pkgs/build-support/dart/build-dart-application/default.nix b/pkgs/build-support/dart/build-dart-application/default.nix index b2535123e382..2246c5634d27 100644 --- a/pkgs/build-support/dart/build-dart-application/default.nix +++ b/pkgs/build-support/dart/build-dart-application/default.nix @@ -23,6 +23,7 @@ else if dartOutputType == "js" then "${nodejs}/bin/node" else null +, runtimeDependencies ? [ ] , pubspecLockFile ? null , vendorHash ? "" , ... @@ -39,25 +40,28 @@ let buildDrvArgs = args; inherit pubGetScript vendorHash pubspecLockFile; }; - inherit (dartHooks.override { inherit dart; }) dartConfigHook dartBuildHook dartInstallHook; + inherit (dartHooks.override { inherit dart; }) dartConfigHook dartBuildHook dartInstallHook dartFixupHook; in assert !(builtins.isString dartOutputType && dartOutputType != "") -> throw "dartOutputType must be a non-empty string"; stdenv.mkDerivation (args // { inherit pubGetScript dartCompileCommand dartOutputType dartRuntimeCommand - dartCompileFlags dartJitFlags; + dartCompileFlags dartJitFlags runtimeDependencies; dartEntryPoints = if (dartEntryPoints != null) then writeText "entrypoints.json" (builtins.toJSON dartEntryPoints) else null; + runtimeDependencyLibraryPath = lib.makeLibraryPath runtimeDependencies; + nativeBuildInputs = (args.nativeBuildInputs or [ ]) ++ [ dart dartDeps dartConfigHook dartBuildHook dartInstallHook + dartFixupHook makeWrapper ] ++ lib.optionals stdenv.isDarwin [ darwin.sigtool diff --git a/pkgs/build-support/dart/build-dart-application/hooks/dart-fixup-hook.sh b/pkgs/build-support/dart/build-dart-application/hooks/dart-fixup-hook.sh new file mode 100644 index 000000000000..6e1995aebc13 --- /dev/null +++ b/pkgs/build-support/dart/build-dart-application/hooks/dart-fixup-hook.sh @@ -0,0 +1,21 @@ +# shellcheck shell=bash + +dartFixupHook() { + echo "Executing dartFixupHook" + + echo "Providing runtime dependencies" + if [[ ! -z "$runtimeDependencyLibraryPath" ]]; then + # Add runtime library dependencies to the LD_LIBRARY_PATH. + # For some reason, the RUNPATH of the executable is not used to load dynamic libraries in dart:ffi with DynamicLibrary.open(). + # + # This could alternatively be fixed with patchelf --add-needed, but this would cause all the libraries to be opened immediately, + # which is not what application authors expect. + for f in "$out"/bin/*; do + wrapProgram "$f" --suffix LD_LIBRARY_PATH : "$runtimeDependencyLibraryPath" + done + fi + + echo "Finished dartFixupHook" +} + +postFixupHooks+=(dartFixupHook) \ No newline at end of file diff --git a/pkgs/build-support/dart/build-dart-application/hooks/default.nix b/pkgs/build-support/dart/build-dart-application/hooks/default.nix index 463061c54a8d..134989426d96 100644 --- a/pkgs/build-support/dart/build-dart-application/hooks/default.nix +++ b/pkgs/build-support/dart/build-dart-application/hooks/default.nix @@ -12,4 +12,7 @@ dartInstallHook = makeSetupHook { name = "dart-install-hook"; } ./dart-install-hook.sh; + dartFixupHook = makeSetupHook { + name = "dart-fixup-hook"; + } ./dart-fixup-hook.sh; } From 6298ac27745cbab2dd3895c2c25ad3a795310f78 Mon Sep 17 00:00:00 2001 From: hacker1024 Date: Sat, 21 Oct 2023 22:30:23 +1100 Subject: [PATCH 31/57] buildDartApplication: Use package override mechanism from buildFlutterApplication This allows Dart applications to benefit from the package override system, which is useful for things like FFI dependencies. --- doc/languages-frameworks/dart.section.md | 7 +- .../dart/build-dart-application/default.nix | 108 +- .../dart/package-overrides/default.nix | 3 + .../tools/misc/dart-sass/default.nix | 1 + .../tools/misc/dart-sass/deps.json | 930 ++++++++++++++++++ .../tools/protoc-gen-dart/default.nix | 1 + .../tools/protoc-gen-dart/deps.json | 549 +++++++++++ pkgs/tools/misc/domine/default.nix | 2 +- pkgs/tools/misc/domine/deps.json | 190 ++++ 9 files changed, 1755 insertions(+), 36 deletions(-) create mode 100644 pkgs/development/compilers/dart/package-overrides/default.nix create mode 100644 pkgs/development/tools/misc/dart-sass/deps.json create mode 100644 pkgs/development/tools/protoc-gen-dart/deps.json create mode 100644 pkgs/tools/misc/domine/deps.json diff --git a/doc/languages-frameworks/dart.section.md b/doc/languages-frameworks/dart.section.md index b00327b78eb2..8d9c062f4220 100644 --- a/doc/languages-frameworks/dart.section.md +++ b/doc/languages-frameworks/dart.section.md @@ -12,6 +12,8 @@ If you are packaging a Flutter desktop application, use [`buildFlutterApplicatio If the upstream source is missing a `pubspec.lock` file, you'll have to vendor one and specify it using `pubspecLockFile`. If it is needed, one will be generated for you and printed when attempting to build the derivation. +The `depsListFile` must always be provided when packaging in Nixpkgs. It will be generated and printed if the derivation is attempted to be built without one. Alternatively, `autoDepsList` may be set to `true` only when outside of Nixpkgs, as it relies on import-from-derivation. + The `dart` commands run can be overridden through `pubGetScript` and `dartCompileCommand`, you can also add flags using `dartCompileFlags` or `dartJitFlags`. Dart supports multiple [outputs types](https://dart.dev/tools/dart-compile#types-of-output), you can choose between them using `dartOutputType` (defaults to `exe`). If you want to override the binaries path or the source path they come from, you can use `dartEntryPoints`. Outputs that require a runtime will automatically be wrapped with the relevant runtime (`dartaotruntime` for `aot-snapshot`, `dart run` for `jit-snapshot` and `kernel`, `node` for `js`), this can be overridden through `dartRuntimeCommand`. @@ -31,6 +33,7 @@ buildDartApplication rec { }; pubspecLockFile = ./pubspec.lock; + depsListFile = ./deps.json; vendorHash = "sha256-Atm7zfnDambN/BmmUf4BG0yUz/y6xWzf0reDw3Ad41s="; } ``` @@ -39,9 +42,7 @@ buildDartApplication rec { The function `buildFlutterApplication` builds Flutter applications. -The deps.json file must always be provided when packaging in Nixpkgs. It will be generated and printed if the derivation is attempted to be built without one. Alternatively, `autoDepsList` may be set to `true` when outside of Nixpkgs, as it relies on import-from-derivation. - -A `pubspec.lock` file must be available. See the [Dart documentation](#ssec-dart-applications) for more details. +See the [Dart documentation](#ssec-dart-applications) for more details on required files and arguments. ```nix { flutter, fetchFromGitHub }: diff --git a/pkgs/build-support/dart/build-dart-application/default.nix b/pkgs/build-support/dart/build-dart-application/default.nix index 2246c5634d27..6992c79a37ed 100644 --- a/pkgs/build-support/dart/build-dart-application/default.nix +++ b/pkgs/build-support/dart/build-dart-application/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchDartDeps, runCommand, writeText, dartHooks, makeWrapper, dart, cacert, nodejs, darwin }: +{ lib, stdenv, callPackage, fetchDartDeps, runCommand, writeText, dartHooks, makeWrapper, dart, cacert, nodejs, darwin, jq }: { pubGetScript ? "dart pub get" @@ -24,6 +24,9 @@ else null , runtimeDependencies ? [ ] +, customPackageOverrides ? { } +, autoDepsList ? false +, depsListFile ? null , pubspecLockFile ? null , vendorHash ? "" , ... @@ -41,37 +44,78 @@ let inherit pubGetScript vendorHash pubspecLockFile; }; inherit (dartHooks.override { inherit dart; }) dartConfigHook dartBuildHook dartInstallHook dartFixupHook; + + baseDerivation = stdenv.mkDerivation (finalAttrs: args // { + inherit pubGetScript dartCompileCommand dartOutputType dartRuntimeCommand + dartCompileFlags dartJitFlags runtimeDependencies; + + dartEntryPoints = + if (dartEntryPoints != null) + then writeText "entrypoints.json" (builtins.toJSON dartEntryPoints) + else null; + + runtimeDependencyLibraryPath = lib.makeLibraryPath finalAttrs.runtimeDependencies; + + nativeBuildInputs = (args.nativeBuildInputs or [ ]) ++ [ + dart + dartDeps + dartConfigHook + dartBuildHook + dartInstallHook + dartFixupHook + makeWrapper + jq + ] ++ lib.optionals stdenv.isDarwin [ + darwin.sigtool + ]; + + preUnpack = '' + ${lib.optionalString (!autoDepsList) '' + if ! { [ '${lib.boolToString (depsListFile != null)}' = 'true' ] ${lib.optionalString (depsListFile != null) "&& cmp -s <(jq -Sc . '${depsListFile}') <(jq -Sc . '${finalAttrs.passthru.dartDeps.depsListFile}')"}; }; then + echo 1>&2 -e '\nThe dependency list file was either not given or differs from the expected result.' \ + '\nPlease choose one of the following solutions:' \ + '\n - Duplicate the following file and pass it to the depsListFile argument.' \ + '\n ${finalAttrs.passthru.dartDeps.depsListFile}' \ + '\n - Set autoDepsList to true (not supported by Hydra or permitted in Nixpkgs)'. + exit 1 + fi + ''} + ${args.preUnpack or ""} + ''; + + # When stripping, it seems some ELF information is lost and the dart VM cli + # runs instead of the expected program. Don't strip if it's an exe output. + dontStrip = args.dontStrip or (dartOutputType == "exe"); + + passthru = { inherit dartDeps; } // (args.passthru or { }); + + meta = (args.meta or { }) // { platforms = args.meta.platforms or dart.meta.platforms; }; + }); + + packageOverrideRepository = (callPackage ../../../development/compilers/dart/package-overrides { }) // customPackageOverrides; + productPackages = builtins.filter (package: package.kind != "dev") + (if autoDepsList + then lib.importJSON dartDeps.depsListFile + else + if depsListFile == null + then [ ] + else lib.importJSON depsListFile); in assert !(builtins.isString dartOutputType && dartOutputType != "") -> throw "dartOutputType must be a non-empty string"; -stdenv.mkDerivation (args // { - inherit pubGetScript dartCompileCommand dartOutputType dartRuntimeCommand - dartCompileFlags dartJitFlags runtimeDependencies; - - dartEntryPoints = - if (dartEntryPoints != null) - then writeText "entrypoints.json" (builtins.toJSON dartEntryPoints) - else null; - - runtimeDependencyLibraryPath = lib.makeLibraryPath runtimeDependencies; - - nativeBuildInputs = (args.nativeBuildInputs or [ ]) ++ [ - dart - dartDeps - dartConfigHook - dartBuildHook - dartInstallHook - dartFixupHook - makeWrapper - ] ++ lib.optionals stdenv.isDarwin [ - darwin.sigtool - ]; - - # When stripping, it seems some ELF information is lost and the dart VM cli - # runs instead of the expected program. Don't strip if it's an exe output. - dontStrip = args.dontStrip or (dartOutputType == "exe"); - - passthru = { inherit dartDeps; } // (args.passthru or { }); - - meta = (args.meta or { }) // { platforms = args.meta.platforms or dart.meta.platforms; }; -}) +builtins.foldl' + (prev: package: + if packageOverrideRepository ? ${package.name} + then + prev.overrideAttrs + (packageOverrideRepository.${package.name} { + inherit (package) + name + version + kind + source + dependencies; + }) + else prev) + baseDerivation + productPackages diff --git a/pkgs/development/compilers/dart/package-overrides/default.nix b/pkgs/development/compilers/dart/package-overrides/default.nix new file mode 100644 index 000000000000..a7237fe1cfa1 --- /dev/null +++ b/pkgs/development/compilers/dart/package-overrides/default.nix @@ -0,0 +1,3 @@ +{ callPackage }: + +{ } diff --git a/pkgs/development/tools/misc/dart-sass/default.nix b/pkgs/development/tools/misc/dart-sass/default.nix index a137f5b21ba6..6737e791f952 100644 --- a/pkgs/development/tools/misc/dart-sass/default.nix +++ b/pkgs/development/tools/misc/dart-sass/default.nix @@ -29,6 +29,7 @@ buildDartApplication rec { }; pubspecLockFile = ./pubspec.lock; + depsListFile = ./deps.json; vendorHash = "sha256-PQvY+qFXovSXH5wuc60wCrt5RiooKcaGKYzbjKSvqso="; nativeBuildInputs = [ diff --git a/pkgs/development/tools/misc/dart-sass/deps.json b/pkgs/development/tools/misc/dart-sass/deps.json new file mode 100644 index 000000000000..75548f50d900 --- /dev/null +++ b/pkgs/development/tools/misc/dart-sass/deps.json @@ -0,0 +1,930 @@ +[ + { + "name": "sass", + "version": "1.69.0", + "kind": "root", + "source": "root", + "dependencies": [ + "args", + "async", + "charcode", + "cli_pkg", + "cli_repl", + "collection", + "http", + "js", + "meta", + "native_synchronization", + "node_interop", + "package_config", + "path", + "pool", + "protobuf", + "pub_semver", + "source_maps", + "source_span", + "stack_trace", + "stream_channel", + "stream_transform", + "string_scanner", + "term_glyph", + "typed_data", + "watcher", + "analyzer", + "archive", + "crypto", + "dart_style", + "dartdoc", + "grinder", + "node_preamble", + "lints", + "protoc_plugin", + "pub_api_client", + "pubspec_parse", + "test", + "test_descriptor", + "test_process", + "yaml", + "cli_util" + ] + }, + { + "name": "cli_util", + "version": "0.4.0", + "kind": "dev", + "source": "hosted", + "dependencies": [ + "meta", + "path" + ] + }, + { + "name": "path", + "version": "1.8.3", + "kind": "direct", + "source": "hosted", + "dependencies": [] + }, + { + "name": "meta", + "version": "1.10.0", + "kind": "direct", + "source": "hosted", + "dependencies": [] + }, + { + "name": "yaml", + "version": "3.1.2", + "kind": "dev", + "source": "hosted", + "dependencies": [ + "collection", + "source_span", + "string_scanner" + ] + }, + { + "name": "string_scanner", + "version": "1.2.0", + "kind": "direct", + "source": "hosted", + "dependencies": [ + "source_span" + ] + }, + { + "name": "source_span", + "version": "1.10.0", + "kind": "direct", + "source": "hosted", + "dependencies": [ + "collection", + "path", + "term_glyph" + ] + }, + { + "name": "term_glyph", + "version": "1.2.1", + "kind": "direct", + "source": "hosted", + "dependencies": [] + }, + { + "name": "collection", + "version": "1.18.0", + "kind": "direct", + "source": "hosted", + "dependencies": [] + }, + { + "name": "test_process", + "version": "2.1.0", + "kind": "dev", + "source": "hosted", + "dependencies": [ + "async", + "meta", + "path", + "test" + ] + }, + { + "name": "test", + "version": "1.24.6", + "kind": "dev", + "source": "hosted", + "dependencies": [ + "analyzer", + "async", + "boolean_selector", + "collection", + "coverage", + "http_multi_server", + "io", + "js", + "matcher", + "node_preamble", + "package_config", + "path", + "pool", + "shelf", + "shelf_packages_handler", + "shelf_static", + "shelf_web_socket", + "source_span", + "stack_trace", + "stream_channel", + "test_api", + "test_core", + "typed_data", + "web_socket_channel", + "webkit_inspection_protocol", + "yaml" + ] + }, + { + "name": "webkit_inspection_protocol", + "version": "1.2.1", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "logging" + ] + }, + { + "name": "logging", + "version": "1.2.0", + "kind": "transitive", + "source": "hosted", + "dependencies": [] + }, + { + "name": "web_socket_channel", + "version": "2.4.0", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "async", + "crypto", + "stream_channel" + ] + }, + { + "name": "stream_channel", + "version": "2.1.2", + "kind": "direct", + "source": "hosted", + "dependencies": [ + "async" + ] + }, + { + "name": "async", + "version": "2.11.0", + "kind": "direct", + "source": "hosted", + "dependencies": [ + "collection", + "meta" + ] + }, + { + "name": "crypto", + "version": "3.0.3", + "kind": "dev", + "source": "hosted", + "dependencies": [ + "typed_data" + ] + }, + { + "name": "typed_data", + "version": "1.3.2", + "kind": "direct", + "source": "hosted", + "dependencies": [ + "collection" + ] + }, + { + "name": "test_core", + "version": "0.5.6", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "analyzer", + "args", + "async", + "boolean_selector", + "collection", + "coverage", + "frontend_server_client", + "glob", + "io", + "meta", + "package_config", + "path", + "pool", + "source_map_stack_trace", + "source_maps", + "source_span", + "stack_trace", + "stream_channel", + "test_api", + "vm_service", + "yaml" + ] + }, + { + "name": "vm_service", + "version": "11.10.0", + "kind": "transitive", + "source": "hosted", + "dependencies": [] + }, + { + "name": "test_api", + "version": "0.6.1", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "async", + "boolean_selector", + "collection", + "meta", + "source_span", + "stack_trace", + "stream_channel", + "string_scanner", + "term_glyph" + ] + }, + { + "name": "stack_trace", + "version": "1.11.1", + "kind": "direct", + "source": "hosted", + "dependencies": [ + "path" + ] + }, + { + "name": "boolean_selector", + "version": "2.1.1", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "source_span", + "string_scanner" + ] + }, + { + "name": "source_maps", + "version": "0.10.12", + "kind": "direct", + "source": "hosted", + "dependencies": [ + "source_span" + ] + }, + { + "name": "source_map_stack_trace", + "version": "2.1.1", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "path", + "source_maps", + "stack_trace" + ] + }, + { + "name": "pool", + "version": "1.5.1", + "kind": "direct", + "source": "hosted", + "dependencies": [ + "async", + "stack_trace" + ] + }, + { + "name": "package_config", + "version": "2.1.0", + "kind": "direct", + "source": "hosted", + "dependencies": [ + "path" + ] + }, + { + "name": "io", + "version": "1.0.4", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "meta", + "path", + "string_scanner" + ] + }, + { + "name": "glob", + "version": "2.1.2", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "async", + "collection", + "file", + "path", + "string_scanner" + ] + }, + { + "name": "file", + "version": "7.0.0", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "meta", + "path" + ] + }, + { + "name": "frontend_server_client", + "version": "3.2.0", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "async", + "path" + ] + }, + { + "name": "coverage", + "version": "1.6.3", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "args", + "logging", + "package_config", + "path", + "source_maps", + "stack_trace", + "vm_service" + ] + }, + { + "name": "args", + "version": "2.4.2", + "kind": "direct", + "source": "hosted", + "dependencies": [] + }, + { + "name": "analyzer", + "version": "5.13.0", + "kind": "dev", + "source": "hosted", + "dependencies": [ + "_fe_analyzer_shared", + "collection", + "convert", + "crypto", + "glob", + "meta", + "package_config", + "path", + "pub_semver", + "source_span", + "watcher", + "yaml" + ] + }, + { + "name": "watcher", + "version": "1.1.0", + "kind": "direct", + "source": "hosted", + "dependencies": [ + "async", + "path" + ] + }, + { + "name": "pub_semver", + "version": "2.1.4", + "kind": "direct", + "source": "hosted", + "dependencies": [ + "collection", + "meta" + ] + }, + { + "name": "convert", + "version": "3.1.1", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "typed_data" + ] + }, + { + "name": "_fe_analyzer_shared", + "version": "61.0.0", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "meta" + ] + }, + { + "name": "shelf_web_socket", + "version": "1.0.4", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "shelf", + "stream_channel", + "web_socket_channel" + ] + }, + { + "name": "shelf", + "version": "1.4.1", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "async", + "collection", + "http_parser", + "path", + "stack_trace", + "stream_channel" + ] + }, + { + "name": "http_parser", + "version": "4.0.2", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "collection", + "source_span", + "string_scanner", + "typed_data" + ] + }, + { + "name": "shelf_static", + "version": "1.1.2", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "convert", + "http_parser", + "mime", + "path", + "shelf" + ] + }, + { + "name": "mime", + "version": "1.0.4", + "kind": "transitive", + "source": "hosted", + "dependencies": [] + }, + { + "name": "shelf_packages_handler", + "version": "3.0.2", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "path", + "shelf", + "shelf_static" + ] + }, + { + "name": "node_preamble", + "version": "2.0.2", + "kind": "dev", + "source": "hosted", + "dependencies": [] + }, + { + "name": "matcher", + "version": "0.12.16", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "async", + "meta", + "stack_trace", + "term_glyph", + "test_api" + ] + }, + { + "name": "js", + "version": "0.6.7", + "kind": "direct", + "source": "hosted", + "dependencies": [ + "meta" + ] + }, + { + "name": "http_multi_server", + "version": "3.2.1", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "async" + ] + }, + { + "name": "test_descriptor", + "version": "2.0.1", + "kind": "dev", + "source": "hosted", + "dependencies": [ + "async", + "collection", + "matcher", + "meta", + "path", + "term_glyph", + "test" + ] + }, + { + "name": "pubspec_parse", + "version": "1.2.3", + "kind": "dev", + "source": "hosted", + "dependencies": [ + "checked_yaml", + "collection", + "json_annotation", + "pub_semver", + "yaml" + ] + }, + { + "name": "json_annotation", + "version": "4.8.1", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "meta" + ] + }, + { + "name": "checked_yaml", + "version": "2.0.3", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "json_annotation", + "source_span", + "yaml" + ] + }, + { + "name": "pub_api_client", + "version": "2.6.0", + "kind": "dev", + "source": "hosted", + "dependencies": [ + "collection", + "http", + "oauth2", + "path", + "pubspec" + ] + }, + { + "name": "pubspec", + "version": "2.3.0", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "path", + "pub_semver", + "yaml", + "uri" + ] + }, + { + "name": "uri", + "version": "1.0.0", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "matcher", + "quiver" + ] + }, + { + "name": "quiver", + "version": "3.2.1", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "matcher" + ] + }, + { + "name": "oauth2", + "version": "2.0.2", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "collection", + "crypto", + "http", + "http_parser" + ] + }, + { + "name": "http", + "version": "1.1.0", + "kind": "direct", + "source": "hosted", + "dependencies": [ + "async", + "http_parser", + "meta" + ] + }, + { + "name": "protoc_plugin", + "version": "21.1.1", + "kind": "dev", + "source": "hosted", + "dependencies": [ + "fixnum", + "path", + "protobuf" + ] + }, + { + "name": "protobuf", + "version": "3.1.0", + "kind": "direct", + "source": "hosted", + "dependencies": [ + "collection", + "fixnum", + "meta" + ] + }, + { + "name": "fixnum", + "version": "1.1.0", + "kind": "transitive", + "source": "hosted", + "dependencies": [] + }, + { + "name": "lints", + "version": "2.1.1", + "kind": "dev", + "source": "hosted", + "dependencies": [] + }, + { + "name": "grinder", + "version": "0.9.4", + "kind": "dev", + "source": "hosted", + "dependencies": [ + "cli_util", + "glob", + "meta", + "path", + "collection" + ] + }, + { + "name": "dartdoc", + "version": "6.3.0", + "kind": "dev", + "source": "hosted", + "dependencies": [ + "analyzer", + "args", + "cli_util", + "collection", + "crypto", + "glob", + "html", + "logging", + "markdown", + "meta", + "package_config", + "path", + "pub_semver", + "source_span", + "yaml" + ] + }, + { + "name": "markdown", + "version": "7.1.1", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "args", + "meta" + ] + }, + { + "name": "html", + "version": "0.15.4", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "csslib", + "source_span" + ] + }, + { + "name": "csslib", + "version": "1.0.0", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "source_span" + ] + }, + { + "name": "dart_style", + "version": "2.3.2", + "kind": "dev", + "source": "hosted", + "dependencies": [ + "analyzer", + "args", + "path", + "pub_semver", + "source_span" + ] + }, + { + "name": "archive", + "version": "3.3.9", + "kind": "dev", + "source": "hosted", + "dependencies": [ + "crypto", + "path", + "pointycastle" + ] + }, + { + "name": "pointycastle", + "version": "3.7.3", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "collection", + "convert", + "js" + ] + }, + { + "name": "stream_transform", + "version": "2.1.0", + "kind": "direct", + "source": "hosted", + "dependencies": [] + }, + { + "name": "node_interop", + "version": "2.1.0", + "kind": "direct", + "source": "hosted", + "dependencies": [ + "js" + ] + }, + { + "name": "native_synchronization", + "version": "0.2.0", + "kind": "direct", + "source": "hosted", + "dependencies": [ + "ffi" + ] + }, + { + "name": "ffi", + "version": "2.1.0", + "kind": "transitive", + "source": "hosted", + "dependencies": [] + }, + { + "name": "cli_repl", + "version": "0.2.3", + "kind": "direct", + "source": "hosted", + "dependencies": [ + "async", + "js" + ] + }, + { + "name": "cli_pkg", + "version": "2.5.0", + "kind": "direct", + "source": "hosted", + "dependencies": [ + "archive", + "async", + "charcode", + "cli_util", + "collection", + "crypto", + "glob", + "grinder", + "http", + "js", + "meta", + "node_interop", + "node_preamble", + "package_config", + "path", + "pool", + "pub_semver", + "pubspec_parse", + "retry", + "string_scanner", + "test", + "test_process", + "xml", + "yaml" + ] + }, + { + "name": "xml", + "version": "6.4.2", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "collection", + "meta", + "petitparser" + ] + }, + { + "name": "petitparser", + "version": "6.0.1", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "meta" + ] + }, + { + "name": "retry", + "version": "3.1.2", + "kind": "transitive", + "source": "hosted", + "dependencies": [] + }, + { + "name": "charcode", + "version": "1.3.1", + "kind": "direct", + "source": "hosted", + "dependencies": [] + } +] diff --git a/pkgs/development/tools/protoc-gen-dart/default.nix b/pkgs/development/tools/protoc-gen-dart/default.nix index 29892b954fc7..fa11e1b60e80 100644 --- a/pkgs/development/tools/protoc-gen-dart/default.nix +++ b/pkgs/development/tools/protoc-gen-dart/default.nix @@ -16,6 +16,7 @@ buildDartApplication rec { sourceRoot = "${src.name}/protoc_plugin"; pubspecLockFile = ./pubspec.lock; + depsListFile = ./deps.json; vendorHash = "sha256-yNgQLCLDCbA07v9tIwPRks/xPAzLVykNtIk+8C0twYM="; meta = with lib; { diff --git a/pkgs/development/tools/protoc-gen-dart/deps.json b/pkgs/development/tools/protoc-gen-dart/deps.json new file mode 100644 index 000000000000..c00a66e0d849 --- /dev/null +++ b/pkgs/development/tools/protoc-gen-dart/deps.json @@ -0,0 +1,549 @@ +[ + { + "name": "protoc_plugin", + "version": "21.1.0", + "kind": "root", + "source": "root", + "dependencies": [ + "fixnum", + "path", + "protobuf", + "collection", + "dart_flutter_team_lints", + "matcher", + "test" + ] + }, + { + "name": "test", + "version": "1.24.6", + "kind": "dev", + "source": "hosted", + "dependencies": [ + "analyzer", + "async", + "boolean_selector", + "collection", + "coverage", + "http_multi_server", + "io", + "js", + "matcher", + "node_preamble", + "package_config", + "path", + "pool", + "shelf", + "shelf_packages_handler", + "shelf_static", + "shelf_web_socket", + "source_span", + "stack_trace", + "stream_channel", + "test_api", + "test_core", + "typed_data", + "web_socket_channel", + "webkit_inspection_protocol", + "yaml" + ] + }, + { + "name": "yaml", + "version": "3.1.2", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "collection", + "source_span", + "string_scanner" + ] + }, + { + "name": "string_scanner", + "version": "1.2.0", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "source_span" + ] + }, + { + "name": "source_span", + "version": "1.10.0", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "collection", + "path", + "term_glyph" + ] + }, + { + "name": "term_glyph", + "version": "1.2.1", + "kind": "transitive", + "source": "hosted", + "dependencies": [] + }, + { + "name": "path", + "version": "1.8.3", + "kind": "direct", + "source": "hosted", + "dependencies": [] + }, + { + "name": "collection", + "version": "1.18.0", + "kind": "dev", + "source": "hosted", + "dependencies": [] + }, + { + "name": "webkit_inspection_protocol", + "version": "1.2.0", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "logging" + ] + }, + { + "name": "logging", + "version": "1.2.0", + "kind": "transitive", + "source": "hosted", + "dependencies": [] + }, + { + "name": "web_socket_channel", + "version": "2.4.0", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "async", + "crypto", + "stream_channel" + ] + }, + { + "name": "stream_channel", + "version": "2.1.2", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "async" + ] + }, + { + "name": "async", + "version": "2.11.0", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "collection", + "meta" + ] + }, + { + "name": "meta", + "version": "1.9.1", + "kind": "transitive", + "source": "hosted", + "dependencies": [] + }, + { + "name": "crypto", + "version": "3.0.3", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "typed_data" + ] + }, + { + "name": "typed_data", + "version": "1.3.2", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "collection" + ] + }, + { + "name": "test_core", + "version": "0.5.6", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "analyzer", + "args", + "async", + "boolean_selector", + "collection", + "coverage", + "frontend_server_client", + "glob", + "io", + "meta", + "package_config", + "path", + "pool", + "source_map_stack_trace", + "source_maps", + "source_span", + "stack_trace", + "stream_channel", + "test_api", + "vm_service", + "yaml" + ] + }, + { + "name": "vm_service", + "version": "11.10.0", + "kind": "transitive", + "source": "hosted", + "dependencies": [] + }, + { + "name": "test_api", + "version": "0.6.1", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "async", + "boolean_selector", + "collection", + "meta", + "source_span", + "stack_trace", + "stream_channel", + "string_scanner", + "term_glyph" + ] + }, + { + "name": "stack_trace", + "version": "1.11.1", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "path" + ] + }, + { + "name": "boolean_selector", + "version": "2.1.1", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "source_span", + "string_scanner" + ] + }, + { + "name": "source_maps", + "version": "0.10.12", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "source_span" + ] + }, + { + "name": "source_map_stack_trace", + "version": "2.1.1", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "path", + "source_maps", + "stack_trace" + ] + }, + { + "name": "pool", + "version": "1.5.1", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "async", + "stack_trace" + ] + }, + { + "name": "package_config", + "version": "2.1.0", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "path" + ] + }, + { + "name": "io", + "version": "1.0.4", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "meta", + "path", + "string_scanner" + ] + }, + { + "name": "glob", + "version": "2.1.2", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "async", + "collection", + "file", + "path", + "string_scanner" + ] + }, + { + "name": "file", + "version": "7.0.0", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "meta", + "path" + ] + }, + { + "name": "frontend_server_client", + "version": "3.2.0", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "async", + "path" + ] + }, + { + "name": "coverage", + "version": "1.6.3", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "args", + "logging", + "package_config", + "path", + "source_maps", + "stack_trace", + "vm_service" + ] + }, + { + "name": "args", + "version": "2.4.2", + "kind": "transitive", + "source": "hosted", + "dependencies": [] + }, + { + "name": "analyzer", + "version": "6.2.0", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "_fe_analyzer_shared", + "collection", + "convert", + "crypto", + "glob", + "meta", + "package_config", + "path", + "pub_semver", + "source_span", + "watcher", + "yaml" + ] + }, + { + "name": "watcher", + "version": "1.1.0", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "async", + "path" + ] + }, + { + "name": "pub_semver", + "version": "2.1.4", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "collection", + "meta" + ] + }, + { + "name": "convert", + "version": "3.1.1", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "typed_data" + ] + }, + { + "name": "_fe_analyzer_shared", + "version": "64.0.0", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "meta" + ] + }, + { + "name": "shelf_web_socket", + "version": "1.0.4", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "shelf", + "stream_channel", + "web_socket_channel" + ] + }, + { + "name": "shelf", + "version": "1.4.1", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "async", + "collection", + "http_parser", + "path", + "stack_trace", + "stream_channel" + ] + }, + { + "name": "http_parser", + "version": "4.0.2", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "collection", + "source_span", + "string_scanner", + "typed_data" + ] + }, + { + "name": "shelf_static", + "version": "1.1.2", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "convert", + "http_parser", + "mime", + "path", + "shelf" + ] + }, + { + "name": "mime", + "version": "1.0.4", + "kind": "transitive", + "source": "hosted", + "dependencies": [] + }, + { + "name": "shelf_packages_handler", + "version": "3.0.2", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "path", + "shelf", + "shelf_static" + ] + }, + { + "name": "node_preamble", + "version": "2.0.2", + "kind": "transitive", + "source": "hosted", + "dependencies": [] + }, + { + "name": "matcher", + "version": "0.12.16", + "kind": "dev", + "source": "hosted", + "dependencies": [ + "async", + "meta", + "stack_trace", + "term_glyph", + "test_api" + ] + }, + { + "name": "js", + "version": "0.6.7", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "meta" + ] + }, + { + "name": "http_multi_server", + "version": "3.2.1", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "async" + ] + }, + { + "name": "dart_flutter_team_lints", + "version": "1.0.0", + "kind": "dev", + "source": "hosted", + "dependencies": [ + "lints" + ] + }, + { + "name": "lints", + "version": "2.1.1", + "kind": "transitive", + "source": "hosted", + "dependencies": [] + }, + { + "name": "protobuf", + "version": "3.1.0", + "kind": "direct", + "source": "path", + "dependencies": [ + "collection", + "fixnum", + "meta" + ] + }, + { + "name": "fixnum", + "version": "1.1.0", + "kind": "direct", + "source": "hosted", + "dependencies": [] + } +] diff --git a/pkgs/tools/misc/domine/default.nix b/pkgs/tools/misc/domine/default.nix index cd62b9bd1a74..421b49a9d4a4 100644 --- a/pkgs/tools/misc/domine/default.nix +++ b/pkgs/tools/misc/domine/default.nix @@ -12,6 +12,6 @@ buildDartApplication rec { }; pubspecLockFile = ./pubspec.lock; - + depsListFile = ./deps.json; vendorHash = "16z3paq1nxlnzs20qlljnwa2ff6xfhdqzcq8d8izkl7w1j4hyxgn"; } diff --git a/pkgs/tools/misc/domine/deps.json b/pkgs/tools/misc/domine/deps.json new file mode 100644 index 000000000000..baa466f5e2f2 --- /dev/null +++ b/pkgs/tools/misc/domine/deps.json @@ -0,0 +1,190 @@ +[ + { + "name": "domine", + "version": "1.1.0+3", + "kind": "root", + "source": "root", + "dependencies": [ + "args", + "dart_openai", + "dio", + "dio_smart_retry", + "tint", + "lints" + ] + }, + { + "name": "lints", + "version": "2.1.1", + "kind": "dev", + "source": "hosted", + "dependencies": [] + }, + { + "name": "tint", + "version": "2.0.1", + "kind": "direct", + "source": "hosted", + "dependencies": [] + }, + { + "name": "dio_smart_retry", + "version": "5.0.0", + "kind": "direct", + "source": "hosted", + "dependencies": [ + "dio", + "http_parser", + "path" + ] + }, + { + "name": "path", + "version": "1.8.3", + "kind": "transitive", + "source": "hosted", + "dependencies": [] + }, + { + "name": "http_parser", + "version": "4.0.2", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "collection", + "source_span", + "string_scanner", + "typed_data" + ] + }, + { + "name": "typed_data", + "version": "1.3.2", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "collection" + ] + }, + { + "name": "collection", + "version": "1.17.2", + "kind": "transitive", + "source": "hosted", + "dependencies": [] + }, + { + "name": "string_scanner", + "version": "1.2.0", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "source_span" + ] + }, + { + "name": "source_span", + "version": "1.10.0", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "collection", + "path", + "term_glyph" + ] + }, + { + "name": "term_glyph", + "version": "1.2.1", + "kind": "transitive", + "source": "hosted", + "dependencies": [] + }, + { + "name": "dio", + "version": "5.3.2", + "kind": "direct", + "source": "hosted", + "dependencies": [ + "async", + "http_parser", + "meta", + "path" + ] + }, + { + "name": "meta", + "version": "1.9.1", + "kind": "transitive", + "source": "hosted", + "dependencies": [] + }, + { + "name": "async", + "version": "2.11.0", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "collection", + "meta" + ] + }, + { + "name": "dart_openai", + "version": "4.0.0", + "kind": "direct", + "source": "hosted", + "dependencies": [ + "http", + "meta", + "collection", + "fetch_client" + ] + }, + { + "name": "fetch_client", + "version": "1.0.2", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "fetch_api", + "http" + ] + }, + { + "name": "http", + "version": "1.1.0", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "async", + "http_parser", + "meta" + ] + }, + { + "name": "fetch_api", + "version": "1.0.1", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "js" + ] + }, + { + "name": "js", + "version": "0.6.7", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "meta" + ] + }, + { + "name": "args", + "version": "2.4.2", + "kind": "direct", + "source": "hosted", + "dependencies": [] + } +] From 5391c0204e54b0d1852415108f20ad316f20cdaf Mon Sep 17 00:00:00 2001 From: hacker1024 Date: Sat, 21 Oct 2023 22:37:01 +1100 Subject: [PATCH 32/57] buildDartApplication: Allow passing a `sdkSetupScript` --- .../dart/build-dart-application/default.nix | 9 +++++---- .../build-dart-application/hooks/dart-config-hook.sh | 3 +++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/pkgs/build-support/dart/build-dart-application/default.nix b/pkgs/build-support/dart/build-dart-application/default.nix index 6992c79a37ed..7920a3d61a7a 100644 --- a/pkgs/build-support/dart/build-dart-application/default.nix +++ b/pkgs/build-support/dart/build-dart-application/default.nix @@ -1,6 +1,7 @@ { lib, stdenv, callPackage, fetchDartDeps, runCommand, writeText, dartHooks, makeWrapper, dart, cacert, nodejs, darwin, jq }: -{ pubGetScript ? "dart pub get" +{ sdkSetupScript ? "" +, pubGetScript ? "dart pub get" # Output type to produce. Can be any kind supported by dart # https://dart.dev/tools/dart-compile#types-of-output @@ -41,13 +42,13 @@ let ''; }) { buildDrvArgs = args; - inherit pubGetScript vendorHash pubspecLockFile; + inherit sdkSetupScript pubGetScript vendorHash pubspecLockFile; }; inherit (dartHooks.override { inherit dart; }) dartConfigHook dartBuildHook dartInstallHook dartFixupHook; baseDerivation = stdenv.mkDerivation (finalAttrs: args // { - inherit pubGetScript dartCompileCommand dartOutputType dartRuntimeCommand - dartCompileFlags dartJitFlags runtimeDependencies; + inherit sdkSetupScript pubGetScript dartCompileCommand dartOutputType + dartRuntimeCommand dartCompileFlags dartJitFlags runtimeDependencies; dartEntryPoints = if (dartEntryPoints != null) diff --git a/pkgs/build-support/dart/build-dart-application/hooks/dart-config-hook.sh b/pkgs/build-support/dart/build-dart-application/hooks/dart-config-hook.sh index 3e901995237d..f22d7d2ce64d 100644 --- a/pkgs/build-support/dart/build-dart-application/hooks/dart-config-hook.sh +++ b/pkgs/build-support/dart/build-dart-application/hooks/dart-config-hook.sh @@ -3,6 +3,9 @@ dartConfigHook() { echo "Executing dartConfigHook" + echo "Setting up SDK" + eval "$sdkSetupScript" + echo "Installing dependencies" eval doPubGet "$pubGetScript" --offline From becdfbe17c5a2104a9e7e024910c6157b1cd10dd Mon Sep 17 00:00:00 2001 From: hacker1024 Date: Sun, 22 Oct 2023 00:14:42 +1100 Subject: [PATCH 33/57] buildDartApplication: Recognise extraWrapProgramArgs --- .../dart/build-dart-application/default.nix | 1 + .../hooks/dart-fixup-hook.sh | 25 +++++++++++++------ 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/pkgs/build-support/dart/build-dart-application/default.nix b/pkgs/build-support/dart/build-dart-application/default.nix index 7920a3d61a7a..76328e5645f6 100644 --- a/pkgs/build-support/dart/build-dart-application/default.nix +++ b/pkgs/build-support/dart/build-dart-application/default.nix @@ -25,6 +25,7 @@ else null , runtimeDependencies ? [ ] +, extraWrapProgramArgs ? "" , customPackageOverrides ? { } , autoDepsList ? false , depsListFile ? null diff --git a/pkgs/build-support/dart/build-dart-application/hooks/dart-fixup-hook.sh b/pkgs/build-support/dart/build-dart-application/hooks/dart-fixup-hook.sh index 6e1995aebc13..dd96ab374860 100644 --- a/pkgs/build-support/dart/build-dart-application/hooks/dart-fixup-hook.sh +++ b/pkgs/build-support/dart/build-dart-application/hooks/dart-fixup-hook.sh @@ -3,15 +3,26 @@ dartFixupHook() { echo "Executing dartFixupHook" - echo "Providing runtime dependencies" + declare -a wrapProgramArgs + + # Add runtime library dependencies to the LD_LIBRARY_PATH. + # For some reason, the RUNPATH of the executable is not used to load dynamic libraries in dart:ffi with DynamicLibrary.open(). + # + # This could alternatively be fixed with patchelf --add-needed, but this would cause all the libraries to be opened immediately, + # which is not what application authors expect. + echo "$runtimeDependencyLibraryPath" if [[ ! -z "$runtimeDependencyLibraryPath" ]]; then - # Add runtime library dependencies to the LD_LIBRARY_PATH. - # For some reason, the RUNPATH of the executable is not used to load dynamic libraries in dart:ffi with DynamicLibrary.open(). - # - # This could alternatively be fixed with patchelf --add-needed, but this would cause all the libraries to be opened immediately, - # which is not what application authors expect. + wrapProgramArgs+=(--suffix LD_LIBRARY_PATH : \"$runtimeDependencyLibraryPath\") + fi + + if [[ ! -z "$extraWrapProgramArgs" ]]; then + wrapProgramArgs+=("$extraWrapProgramArgs") + fi + + if [ ${#wrapProgramArgs[@]} -ne 0 ]; then for f in "$out"/bin/*; do - wrapProgram "$f" --suffix LD_LIBRARY_PATH : "$runtimeDependencyLibraryPath" + echo "Wrapping $f..." + eval "wrapProgram \"$f\" ${wrapProgramArgs[@]}" done fi From 6e4796d619a52329db6ae9722a8ce8c4a037bcf1 Mon Sep 17 00:00:00 2001 From: networkException Date: Sat, 21 Oct 2023 12:58:07 +0200 Subject: [PATCH 34/57] chromium,electron: always output sri hashes from update scripts this patch changes the update script to always output sri hashes for all hashes written to chromium's `upstream-info.nix` and electron's `info.json`. the keys have also been renamed from `sha256` to `hash`. --- .../networking/browsers/chromium/update.py | 20 +++++++++---------- pkgs/development/tools/electron/update.py | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/pkgs/applications/networking/browsers/chromium/update.py b/pkgs/applications/networking/browsers/chromium/update.py index fd8f36778405..60267331cc27 100755 --- a/pkgs/applications/networking/browsers/chromium/update.py +++ b/pkgs/applications/networking/browsers/chromium/update.py @@ -59,9 +59,9 @@ def prefetch_src_sri_hash(attr_path, version): def nix_prefetch_url(url, algo='sha256'): """Prefetches the content of the given URL.""" - print(f'nix-prefetch-url {url}') - out = subprocess.check_output(['nix-prefetch-url', '--type', algo, url]) - return out.decode('utf-8').rstrip() + print(f'nix store prefetch-file {url}') + out = subprocess.check_output(['nix', 'store', 'prefetch-file', '--json', '--hash-type', algo, url]) + return json.loads(out)['hash'] def nix_prefetch_git(url, rev): @@ -96,9 +96,9 @@ def get_chromedriver(channel): return { 'version': channel['version'], - 'sha256_linux': nix_prefetch_url(get_chromedriver_url('linux64')), - 'sha256_darwin': nix_prefetch_url(get_chromedriver_url('mac-x64')), - 'sha256_darwin_aarch64': nix_prefetch_url(get_chromedriver_url('mac-arm64')) + 'hash_linux': nix_prefetch_url(get_chromedriver_url('linux64')), + 'hash_darwin': nix_prefetch_url(get_chromedriver_url('mac-x64')), + 'hash_darwin_aarch64': nix_prefetch_url(get_chromedriver_url('mac-arm64')) } @@ -113,7 +113,7 @@ def get_channel_dependencies(version): 'version': datetime.fromisoformat(gn['date']).date().isoformat(), 'url': gn['url'], 'rev': gn['rev'], - 'sha256': gn['sha256'] + 'hash': gn['hash'] } } @@ -222,11 +222,11 @@ with urlopen(RELEASES_URL) as resp: google_chrome_suffix = channel_name try: - channel['sha256'] = prefetch_src_sri_hash( + channel['hash'] = prefetch_src_sri_hash( channel_name_to_attr_name(channel_name), release["version"] ) - channel['sha256bin64'] = nix_prefetch_url( + channel['hash_deb_amd64'] = nix_prefetch_url( f'{DEB_URL}/google-chrome-{google_chrome_suffix}/' + f'google-chrome-{google_chrome_suffix}_{release["version"]}-1_amd64.deb') except subprocess.CalledProcessError: @@ -241,7 +241,7 @@ with urlopen(RELEASES_URL) as resp: ungoogled_repo_url = 'https://github.com/ungoogled-software/ungoogled-chromium.git' channel['deps']['ungoogled-patches'] = { 'rev': release['ungoogled_tag'], - 'sha256': nix_prefetch_git(ungoogled_repo_url, release['ungoogled_tag'])['sha256'] + 'hash': nix_prefetch_git(ungoogled_repo_url, release['ungoogled_tag'])['hash'] } with open(UNGOOGLED_FLAGS_PATH, 'w') as out: out.write(get_ungoogled_chromium_gn_flags(release['ungoogled_tag'])) diff --git a/pkgs/development/tools/electron/update.py b/pkgs/development/tools/electron/update.py index 1ea11bd5bba9..128b1dc05067 100755 --- a/pkgs/development/tools/electron/update.py +++ b/pkgs/development/tools/electron/update.py @@ -188,7 +188,7 @@ def get_gn_source(repo): "version": datetime.fromisoformat(gn["date"]).date().isoformat(), "url": gn["url"], "rev": gn["rev"], - "sha256": gn["sha256"] + "hash": gn["hash"] } } From 2addb67a1408441b090e3ba158c8ab19e2ab3dc5 Mon Sep 17 00:00:00 2001 From: hacker1024 Date: Sun, 22 Oct 2023 00:31:58 +1100 Subject: [PATCH 35/57] buildFlutterApplication: Wrap buildDartApplication --- pkgs/build-support/flutter/default.nix | 182 +++++------------- .../dart/package-overrides/default.nix | 7 +- .../flutter-secure-storage-linux/default.nix | 0 .../handy-window/default.nix | 0 .../package-overrides/matrix/default.nix | 0 .../package-overrides/olm/default.nix | 0 .../flutter/package-overrides/default.nix | 8 - 7 files changed, 54 insertions(+), 143 deletions(-) rename pkgs/development/compilers/{flutter => dart}/package-overrides/flutter-secure-storage-linux/default.nix (100%) rename pkgs/development/compilers/{flutter => dart}/package-overrides/handy-window/default.nix (100%) rename pkgs/development/compilers/{flutter => dart}/package-overrides/matrix/default.nix (100%) rename pkgs/development/compilers/{flutter => dart}/package-overrides/olm/default.nix (100%) delete mode 100644 pkgs/development/compilers/flutter/package-overrides/default.nix diff --git a/pkgs/build-support/flutter/default.nix b/pkgs/build-support/flutter/default.nix index a0ed1211ed81..3e136211655b 100644 --- a/pkgs/build-support/flutter/default.nix +++ b/pkgs/build-support/flutter/default.nix @@ -1,34 +1,28 @@ { lib , callPackage -, stdenvNoCC , runCommand , makeWrapper , wrapGAppsHook -, llvmPackages_13 +, fetchDartDeps +, buildDartApplication , cacert , glib , flutter -, jq }: # absolutely no mac support for now { pubGetScript ? "flutter pub get" , flutterBuildFlags ? [ ] -, runtimeDependencies ? [ ] -, customPackageOverrides ? { } -, autoDepsList ? false -, depsListFile ? null -, vendorHash ? "" -, pubspecLockFile ? null -, nativeBuildInputs ? [ ] -, preUnpack ? "" -, postFixup ? "" , extraWrapProgramArgs ? "" , ... }@args: -let - flutterSetupScript = '' + +(buildDartApplication.override { + dart = flutter; + fetchDartDeps = fetchDartDeps.override { dart = flutter; }; +}) (args // { + sdkSetupScript = '' # Pub needs SSL certificates. Dart normally looks in a hardcoded path. # https://github.com/dart-lang/sdk/blob/3.1.0/runtime/bin/security_context_linux.cc#L48 # @@ -54,136 +48,56 @@ let flutter config --enable-linux-desktop >/dev/null ''; - deps = callPackage ../dart/fetch-dart-deps { dart = flutter; } { - sdkSetupScript = flutterSetupScript; - inherit pubGetScript vendorHash pubspecLockFile; - buildDrvArgs = args; - }; + nativeBuildInputs = (args.nativeBuildInputs or [ ]) ++ [ wrapGAppsHook ]; + buildInputs = (args.buildInputs or [ ]) ++ [ glib ]; - baseDerivation = llvmPackages_13.stdenv.mkDerivation (finalAttrs: args // { - inherit flutterBuildFlags runtimeDependencies; + dontDartBuild = true; + buildPhase = args.buildPhase or '' + runHook preBuild - outputs = [ "out" "debug" ]; + mkdir -p build/flutter_assets/fonts - nativeBuildInputs = [ - makeWrapper - deps - flutter - jq - glib - wrapGAppsHook - ] ++ nativeBuildInputs; + doPubGet flutter pub get --offline -v + flutter build linux -v --release --split-debug-info="$debug" ${builtins.concatStringsSep " " (map (flag: "\"${flag}\"") flutterBuildFlags)} - dontWrapGApps = true; + runHook postBuild + ''; - preUnpack = '' - ${lib.optionalString (!autoDepsList) '' - if ! { [ '${lib.boolToString (depsListFile != null)}' = 'true' ] ${lib.optionalString (depsListFile != null) "&& cmp -s <(jq -Sc . '${depsListFile}') <(jq -Sc . '${finalAttrs.passthru.depsListFile}')"}; }; then - echo 1>&2 -e '\nThe dependency list file was either not given or differs from the expected result.' \ - '\nPlease choose one of the following solutions:' \ - '\n - Duplicate the following file and pass it to the depsListFile argument.' \ - '\n ${finalAttrs.passthru.depsListFile}' \ - '\n - Set autoDepsList to true (not supported by Hydra or permitted in Nixpkgs)'. - exit 1 - fi - ''} + dontDartInstall = true; + installPhase = args.installPhase or '' + runHook preInstall - ${preUnpack} - ''; + built=build/linux/*/release/bundle - configurePhase = '' - runHook preConfigure + mkdir -p $out/bin + mv $built $out/app - ${flutterSetupScript} + for f in $(find $out/app -iname "*.desktop" -type f); do + install -D $f $out/share/applications/$(basename $f) + done - runHook postConfigure - ''; + for f in $(find $out/app -maxdepth 1 -type f); do + ln -s $f $out/bin/$(basename $f) + done - buildPhase = '' - runHook preBuild + # make *.so executable + find $out/app -iname "*.so" -type f -exec chmod +x {} + - mkdir -p build/flutter_assets/fonts + # remove stuff like /build/source/packages/ubuntu_desktop_installer/linux/flutter/ephemeral + for f in $(find $out/app -executable -type f); do + if patchelf --print-rpath "$f" | grep /build; then # this ignores static libs (e,g. libapp.so) also + echo "strip RPath of $f" + newrp=$(patchelf --print-rpath $f | sed -r "s|/build.*ephemeral:||g" | sed -r "s|/build.*profile:||g") + patchelf --set-rpath "$newrp" "$f" + fi + done - doPubGet flutter pub get --offline -v - flutter build linux -v --release --split-debug-info="$debug" ${builtins.concatStringsSep " " (map (flag: "\"${flag}\"") finalAttrs.flutterBuildFlags)} + runHook postInstall + ''; - runHook postBuild - ''; - - installPhase = '' - runHook preInstall - - built=build/linux/*/release/bundle - - mkdir -p $out/bin - mv $built $out/app - - for f in $(find $out/app -iname "*.desktop" -type f); do - install -D $f $out/share/applications/$(basename $f) - done - - for f in $(find $out/app -maxdepth 1 -type f); do - ln -s $f $out/bin/$(basename $f) - done - - # make *.so executable - find $out/app -iname "*.so" -type f -exec chmod +x {} + - - # remove stuff like /build/source/packages/ubuntu_desktop_installer/linux/flutter/ephemeral - for f in $(find $out/app -executable -type f); do - if patchelf --print-rpath "$f" | grep /build; then # this ignores static libs (e,g. libapp.so) also - echo "strip RPath of $f" - newrp=$(patchelf --print-rpath $f | sed -r "s|/build.*ephemeral:||g" | sed -r "s|/build.*profile:||g") - patchelf --set-rpath "$newrp" "$f" - fi - done - - runHook postInstall - ''; - - postFixup = '' - # Add runtime library dependencies to the LD_LIBRARY_PATH. - # For some reason, the RUNPATH of the executable is not used to load dynamic libraries in dart:ffi with DynamicLibrary.open(). - # - # This could alternatively be fixed with patchelf --add-needed, but this would cause all the libraries to be opened immediately, - # which is not what application authors expect. - for f in "$out"/bin/*; do - wrapProgram "$f" \ - --suffix LD_LIBRARY_PATH : '${lib.makeLibraryPath finalAttrs.runtimeDependencies}' \ - ''${gappsWrapperArgs[@]} \ - ${extraWrapProgramArgs} - done - - ${postFixup} - ''; - - passthru = (args.passthru or {}) // { - inherit (deps) depsListFile; - }; - }); - - packageOverrideRepository = (callPackage ../../development/compilers/flutter/package-overrides { }) // customPackageOverrides; - productPackages = builtins.filter (package: package.kind != "dev") - (if autoDepsList - then lib.importJSON deps.depsListFile - else - if depsListFile == null - then [ ] - else lib.importJSON depsListFile); -in -builtins.foldl' - (prev: package: - if packageOverrideRepository ? ${package.name} - then - prev.overrideAttrs - (packageOverrideRepository.${package.name} { - inherit (package) - name - version - kind - source - dependencies; - }) - else prev) - baseDerivation - productPackages + dontWrapGApps = true; + extraWrapProgramArgs = '' + ''${gappsWrapperArgs[@]} \ + ${extraWrapProgramArgs} + ''; +}) diff --git a/pkgs/development/compilers/dart/package-overrides/default.nix b/pkgs/development/compilers/dart/package-overrides/default.nix index a7237fe1cfa1..c162929e336a 100644 --- a/pkgs/development/compilers/dart/package-overrides/default.nix +++ b/pkgs/development/compilers/dart/package-overrides/default.nix @@ -1,3 +1,8 @@ { callPackage }: -{ } +{ + flutter_secure_storage_linux = callPackage ./flutter-secure-storage-linux { }; + handy_window = callPackage ./handy-window { }; + matrix = callPackage ./matrix { }; + olm = callPackage ./olm { }; +} diff --git a/pkgs/development/compilers/flutter/package-overrides/flutter-secure-storage-linux/default.nix b/pkgs/development/compilers/dart/package-overrides/flutter-secure-storage-linux/default.nix similarity index 100% rename from pkgs/development/compilers/flutter/package-overrides/flutter-secure-storage-linux/default.nix rename to pkgs/development/compilers/dart/package-overrides/flutter-secure-storage-linux/default.nix diff --git a/pkgs/development/compilers/flutter/package-overrides/handy-window/default.nix b/pkgs/development/compilers/dart/package-overrides/handy-window/default.nix similarity index 100% rename from pkgs/development/compilers/flutter/package-overrides/handy-window/default.nix rename to pkgs/development/compilers/dart/package-overrides/handy-window/default.nix diff --git a/pkgs/development/compilers/flutter/package-overrides/matrix/default.nix b/pkgs/development/compilers/dart/package-overrides/matrix/default.nix similarity index 100% rename from pkgs/development/compilers/flutter/package-overrides/matrix/default.nix rename to pkgs/development/compilers/dart/package-overrides/matrix/default.nix diff --git a/pkgs/development/compilers/flutter/package-overrides/olm/default.nix b/pkgs/development/compilers/dart/package-overrides/olm/default.nix similarity index 100% rename from pkgs/development/compilers/flutter/package-overrides/olm/default.nix rename to pkgs/development/compilers/dart/package-overrides/olm/default.nix diff --git a/pkgs/development/compilers/flutter/package-overrides/default.nix b/pkgs/development/compilers/flutter/package-overrides/default.nix deleted file mode 100644 index c162929e336a..000000000000 --- a/pkgs/development/compilers/flutter/package-overrides/default.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ callPackage }: - -{ - flutter_secure_storage_linux = callPackage ./flutter-secure-storage-linux { }; - handy_window = callPackage ./handy-window { }; - matrix = callPackage ./matrix { }; - olm = callPackage ./olm { }; -} From 98a7a5edd36d91b906558536f73239e709b36feb Mon Sep 17 00:00:00 2001 From: hacker1024 Date: Sun, 22 Oct 2023 00:42:07 +1100 Subject: [PATCH 36/57] dartHooks.dartFixupHook: Add trailing newline --- .../dart/build-dart-application/hooks/dart-fixup-hook.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/build-support/dart/build-dart-application/hooks/dart-fixup-hook.sh b/pkgs/build-support/dart/build-dart-application/hooks/dart-fixup-hook.sh index dd96ab374860..c5a9bedd0665 100644 --- a/pkgs/build-support/dart/build-dart-application/hooks/dart-fixup-hook.sh +++ b/pkgs/build-support/dart/build-dart-application/hooks/dart-fixup-hook.sh @@ -29,4 +29,4 @@ dartFixupHook() { echo "Finished dartFixupHook" } -postFixupHooks+=(dartFixupHook) \ No newline at end of file +postFixupHooks+=(dartFixupHook) From 409ed2c31d35193106122e43012238543cf55ccf Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sat, 21 Oct 2023 13:45:09 +0000 Subject: [PATCH 37/57] sbctl: 0.11 -> 0.12 --- pkgs/tools/security/sbctl/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/security/sbctl/default.nix b/pkgs/tools/security/sbctl/default.nix index 6471425a8581..0778406b40cb 100644 --- a/pkgs/tools/security/sbctl/default.nix +++ b/pkgs/tools/security/sbctl/default.nix @@ -8,16 +8,16 @@ buildGoModule rec { pname = "sbctl"; - version = "0.11"; + version = "0.12"; src = fetchFromGitHub { owner = "Foxboron"; repo = pname; rev = version; - hash = "sha256-kApPb8X1JCP1XfyVFcoCDd+yrytTKSkNWRHKDA3mGaQ="; + hash = "sha256-1dA+a8GS4teaLmclatJNKt+OjhabLO4j/+p4Q95yG/s="; }; - vendorHash = "sha256-WbPYTETTOzqWH+q6fzyDgm0wMScbLWlksLxkDjopF4E="; + vendorHash = "sha256-kVXzHTONPCE1UeAnUiULjubJeZFD0DAxIk+w8/Dqs6c="; ldflags = [ "-s" "-w" "-X github.com/foxboron/sbctl.DatabasePath=${databasePath}" ]; From b247b1e07d3d6dbeacdf709106ac85abd15b80ff Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Sat, 21 Oct 2023 16:52:55 +0200 Subject: [PATCH 38/57] php.packages.grumphp: 1.15.0 -> 2.1.0 --- .../php-packages/grumphp/composer-json.patch | 27 ++++++++++ .../php-packages/grumphp/composer-lock.patch | 24 +++++++++ .../php-packages/grumphp/default.nix | 54 ++++++++++++------- 3 files changed, 86 insertions(+), 19 deletions(-) create mode 100644 pkgs/development/php-packages/grumphp/composer-json.patch create mode 100644 pkgs/development/php-packages/grumphp/composer-lock.patch diff --git a/pkgs/development/php-packages/grumphp/composer-json.patch b/pkgs/development/php-packages/grumphp/composer-json.patch new file mode 100644 index 000000000000..7fd7441612cc --- /dev/null +++ b/pkgs/development/php-packages/grumphp/composer-json.patch @@ -0,0 +1,27 @@ +From 2f53794374e0d32e1f322202c6668655792f745d Mon Sep 17 00:00:00 2001 +From: Pol Dellaiera +Date: Sat, 21 Oct 2023 16:46:59 +0200 +Subject: [PATCH] composer.json + +--- + composer.json | 5 +- + 1 file changed, 4 insertion(+), 1 deletion(-) + +diff --git i/composer.json w/composer.json +index 6ac54420..69b75a51 100644 +--- i/composer.json ++++ w/composer.json +@@ -96,7 +96,10 @@ + "bin/grumphp" + ], + "config": { +- "sort-packages": true ++ "sort-packages": true, ++ "platform": { ++ "php": "8.1" ++ } + }, + "extra": { + "class": "GrumPHP\\Composer\\GrumPHPPlugin" +-- +2.42.0 diff --git a/pkgs/development/php-packages/grumphp/composer-lock.patch b/pkgs/development/php-packages/grumphp/composer-lock.patch new file mode 100644 index 000000000000..2fc801557c4f --- /dev/null +++ b/pkgs/development/php-packages/grumphp/composer-lock.patch @@ -0,0 +1,24 @@ +From 2f53794374e0d32e1f322202c6668655792f745d Mon Sep 17 00:00:00 2001 +From: Pol Dellaiera +Date: Sat, 21 Oct 2023 16:46:59 +0200 +Subject: [PATCH] composer.lock + +--- + phar.composer.lock | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/phar.composer.lock b/phar.composer.lock +index 96b692c3..a8cb2a87 100644 +--- a/phar.composer.lock ++++ b/phar.composer.lock +@@ -4,7 +4,7 @@ + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], +- "content-hash": "8a069c630e6ddbc4475db9a992430539", ++ "content-hash": "0474062650b24a22c63007631cf35f1e", + "packages": [ + { + "name": "amphp/amp", +-- +2.42.0 diff --git a/pkgs/development/php-packages/grumphp/default.nix b/pkgs/development/php-packages/grumphp/default.nix index c7c2d9fc323e..6367dd996bf2 100644 --- a/pkgs/development/php-packages/grumphp/default.nix +++ b/pkgs/development/php-packages/grumphp/default.nix @@ -1,32 +1,48 @@ -{ mkDerivation, fetchurl, makeWrapper, lib, php }: +{ fetchFromGitHub, stdenvNoCC, lib, php }: -mkDerivation (finalAttrs: { +php.buildComposerProject (finalAttrs: { pname = "grumphp"; - version = "1.15.0"; + version = "2.1.0"; - src = fetchurl { - url = "https://github.com/phpro/grumphp/releases/download/v${finalAttrs.version}/grumphp.phar"; - sha256 = "sha256-EqzJb7DYZb7PnebErLVI/EZLxj0m26cniZlsu1feif0="; + src = fetchFromGitHub { + owner = "phpro"; + repo = "grumphp"; + rev = "v${finalAttrs.version}"; + hash = "sha256-RVgreCspdz+A6mdE2H4i8ajmdH8AZ9BOIw2OqLw7HfI="; }; - dontUnpack = true; + patches = [ + ./composer-json.patch + ]; - nativeBuildInputs = [ makeWrapper ]; + composerLock = stdenvNoCC.mkDerivation (finalComposerLockAttrs: { + name = "grumphp-composer-lock"; - installPhase = '' - runHook preInstall - mkdir -p $out/bin - install -D $src $out/libexec/grumphp/grumphp.phar - makeWrapper ${php}/bin/php $out/bin/grumphp \ - --add-flags "$out/libexec/grumphp/grumphp.phar" - runHook postInstall - ''; + src = fetchFromGitHub { + owner = "phpro"; + repo = "grumphp-shim"; + rev = "v${finalAttrs.version}"; + hash = "sha256-JxgRd0p/o3ouZ4MPke8cHqvAPuepY8ax0wx4t8+2dME="; + }; - meta = with lib; { + patches = [ + ./composer-lock.patch + ]; + + installPhase = '' + runHook preInstall + cp phar.composer.lock $out + runHook postInstall + ''; + }); + + vendorHash = "sha256-yefamPAzIabDCzZ9ghKq9iPH7AoCdgCCQ8PKrUN9ifQ="; + + meta = { changelog = "https://github.com/phpro/grumphp/releases/tag/v${finalAttrs.version}"; description = "A PHP code-quality tool"; homepage = "https://github.com/phpro/grumphp"; - license = licenses.mit; - maintainers = teams.php.members; + license = lib.licenses.mit; + maintainers = lib.teams.php.members; }; }) From 77f7b5a3e5cf65b4b31204aae8d205a771ec990e Mon Sep 17 00:00:00 2001 From: dadada Date: Sat, 8 Jul 2023 01:44:42 +0200 Subject: [PATCH 39/57] nixos/soft-serve: init This adds a NixOS module for Soft Serve, a tasty, self-hostable Git server for the command line. The module has a test that checks some basic things like creating users, creating a repo and cloning it. Co-authored-by: Sandro --- .../manual/release-notes/rl-2311.section.md | 2 + nixos/modules/module-list.nix | 1 + nixos/modules/services/misc/soft-serve.nix | 99 +++++++++++++++++ nixos/tests/all-tests.nix | 1 + nixos/tests/soft-serve.nix | 102 ++++++++++++++++++ pkgs/servers/soft-serve/default.nix | 4 +- 6 files changed, 208 insertions(+), 1 deletion(-) create mode 100644 nixos/modules/services/misc/soft-serve.nix create mode 100644 nixos/tests/soft-serve.nix diff --git a/nixos/doc/manual/release-notes/rl-2311.section.md b/nixos/doc/manual/release-notes/rl-2311.section.md index 38c89668f84a..13648364e13e 100644 --- a/nixos/doc/manual/release-notes/rl-2311.section.md +++ b/nixos/doc/manual/release-notes/rl-2311.section.md @@ -113,6 +113,8 @@ - [virt-manager](https://virt-manager.org/), an UI for managing virtual machines in libvirt, is now available as `programs.virt-manager`. +- [Soft Serve](https://github.com/charmbracelet/soft-serve), a tasty, self-hostable Git server for the command line. Available as [services.soft-serve](#opt-services.soft-serve.enable). + ## Backward Incompatibilities {#sec-release-23.11-incompatibilities} - `network-online.target` has been fixed to no longer time out for systems with `networking.useDHCP = true` and `networking.useNetworkd = true`. diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 79918f71f7be..69f2a5a557c1 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -730,6 +730,7 @@ ./services/misc/signald.nix ./services/misc/siproxd.nix ./services/misc/snapper.nix + ./services/misc/soft-serve.nix ./services/misc/sonarr.nix ./services/misc/sourcehut ./services/misc/spice-vdagentd.nix diff --git a/nixos/modules/services/misc/soft-serve.nix b/nixos/modules/services/misc/soft-serve.nix new file mode 100644 index 000000000000..0f246493880b --- /dev/null +++ b/nixos/modules/services/misc/soft-serve.nix @@ -0,0 +1,99 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + cfg = config.services.soft-serve; + configFile = format.generate "config.yaml" cfg.settings; + format = pkgs.formats.yaml { }; + docUrl = "https://charm.sh/blog/self-hosted-soft-serve/"; + stateDir = "/var/lib/soft-serve"; +in +{ + options = { + services.soft-serve = { + enable = mkEnableOption "Enable soft-serve service"; + + package = mkPackageOption pkgs "soft-serve" { }; + + settings = mkOption { + type = format.type; + default = { }; + description = mdDoc '' + The contents of the configuration file. + + See <${docUrl}>. + ''; + example = literalExpression '' + { + name = "dadada's repos"; + log_format = "text"; + ssh = { + listen_addr = ":23231"; + public_url = "ssh://localhost:23231"; + max_timeout = 30; + idle_timeout = 120; + }; + stats.listen_addr = ":23233"; + } + ''; + }; + }; + }; + + config = mkIf cfg.enable { + + systemd.tmpfiles.rules = [ + # The config file has to be inside the state dir + "L+ ${stateDir}/config.yaml - - - - ${configFile}" + ]; + + systemd.services.soft-serve = { + description = "Soft Serve git server"; + documentation = [ docUrl ]; + requires = [ "network-online.target" ]; + after = [ "network-online.target" ]; + wantedBy = [ "multi-user.target" ]; + + environment.SOFT_SERVE_DATA_PATH = stateDir; + + serviceConfig = { + Type = "simple"; + DynamicUser = true; + Restart = "always"; + ExecStart = "${getExe cfg.package} serve"; + StateDirectory = "soft-serve"; + WorkingDirectory = stateDir; + RuntimeDirectory = "soft-serve"; + RuntimeDirectoryMode = "0750"; + ProcSubset = "pid"; + ProtectProc = "invisible"; + UMask = "0027"; + CapabilityBoundingSet = ""; + ProtectHome = true; + PrivateDevices = true; + PrivateUsers = true; + ProtectHostname = true; + ProtectClock = true; + ProtectKernelTunables = true; + ProtectKernelModules = true; + ProtectKernelLogs = true; + ProtectControlGroups = true; + RestrictAddressFamilies = [ "AF_UNIX" "AF_INET" "AF_INET6" ]; + RestrictNamespaces = true; + LockPersonality = true; + MemoryDenyWriteExecute = true; + RestrictRealtime = true; + RemoveIPC = true; + PrivateMounts = true; + SystemCallArchitectures = "native"; + SystemCallFilter = [ + "@system-service" + "~@cpu-emulation @debug @keyring @module @mount @obsolete @privileged @raw-io @reboot @setuid @swap" + ]; + }; + }; + }; + + meta.maintainers = [ maintainers.dadada ]; +} diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 33f8abf6ccd4..59da5827a1be 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -732,6 +732,7 @@ in { snapper = handleTest ./snapper.nix {}; snipe-it = runTest ./web-apps/snipe-it.nix; soapui = handleTest ./soapui.nix {}; + soft-serve = handleTest ./soft-serve.nix {}; sogo = handleTest ./sogo.nix {}; solanum = handleTest ./solanum.nix {}; sonarr = handleTest ./sonarr.nix {}; diff --git a/nixos/tests/soft-serve.nix b/nixos/tests/soft-serve.nix new file mode 100644 index 000000000000..1c4cb4c95819 --- /dev/null +++ b/nixos/tests/soft-serve.nix @@ -0,0 +1,102 @@ +import ./make-test-python.nix ({ pkgs, lib, ... }: +let + inherit (import ./ssh-keys.nix pkgs) snakeOilPrivateKey snakeOilPublicKey; + sshPort = 8231; + httpPort = 8232; + statsPort = 8233; + gitPort = 8418; +in +{ + name = "soft-serve"; + meta.maintainers = with lib.maintainers; [ dadada ]; + nodes = { + client = { pkgs, ... }: { + environment.systemPackages = with pkgs; [ + curl + git + openssh + ]; + environment.etc.sshKey = { + source = snakeOilPrivateKey; + mode = "0600"; + }; + }; + + server = + { config, ... }: + { + services.soft-serve = { + enable = true; + settings = { + name = "TestServer"; + ssh.listen_addr = ":${toString sshPort}"; + git.listen_addr = ":${toString gitPort}"; + http.listen_addr = ":${toString httpPort}"; + stats.listen_addr = ":${toString statsPort}"; + initial_admin_keys = [ snakeOilPublicKey ]; + }; + }; + networking.firewall.allowedTCPPorts = [ sshPort httpPort statsPort ]; + }; + }; + + testScript = + { ... }: + '' + SSH_PORT = ${toString sshPort} + HTTP_PORT = ${toString httpPort} + STATS_PORT = ${toString statsPort} + KEY = "${snakeOilPublicKey}" + SSH_KEY = "/etc/sshKey" + SSH_COMMAND = f"ssh -p {SSH_PORT} -i {SSH_KEY} -o StrictHostKeyChecking=no" + TEST_DIR = "/tmp/test" + GIT = f"git -C {TEST_DIR}" + + for machine in client, server: + machine.wait_for_unit("network.target") + + server.wait_for_unit("soft-serve.service") + server.wait_for_open_port(SSH_PORT) + + with subtest("Get info"): + status, test = client.execute(f"{SSH_COMMAND} server info") + if status != 0: + raise Exception("Failed to get SSH info") + key = " ".join(KEY.split(" ")[0:2]) + if not key in test: + raise Exception("Admin key must be configured correctly") + + with subtest("Create user"): + client.succeed(f"{SSH_COMMAND} server user create beatrice") + client.succeed(f"{SSH_COMMAND} server user info beatrice") + + with subtest("Create repo"): + client.succeed(f"git init {TEST_DIR}") + client.succeed(f"{GIT} config --global user.email you@example.com") + client.succeed(f"touch {TEST_DIR}/foo") + client.succeed(f"{GIT} add foo") + client.succeed(f"{GIT} commit --allow-empty -m test") + client.succeed(f"{GIT} remote add origin git@server:test") + client.succeed(f"GIT_SSH_COMMAND='{SSH_COMMAND}' {GIT} push -u origin master") + client.execute("rm -r /tmp/test") + + server.wait_for_open_port(HTTP_PORT) + + with subtest("Clone over HTTP"): + client.succeed(f"curl --connect-timeout 10 http://server:{HTTP_PORT}/") + client.succeed(f"git clone http://server:{HTTP_PORT}/test /tmp/test") + client.execute("rm -r /tmp/test") + + with subtest("Clone over SSH"): + client.succeed(f"GIT_SSH_COMMAND='{SSH_COMMAND}' git clone git@server:test /tmp/test") + client.execute("rm -r /tmp/test") + + with subtest("Get stats over HTTP"): + server.wait_for_open_port(STATS_PORT) + status, test = client.execute(f"curl --connect-timeout 10 http://server:{STATS_PORT}/metrics") + if status != 0: + raise Exception("Failed to get metrics from status port") + if not "go_gc_duration_seconds_count" in test: + raise Exception("Metrics did not contain key 'go_gc_duration_seconds_count'") + ''; +}) diff --git a/pkgs/servers/soft-serve/default.nix b/pkgs/servers/soft-serve/default.nix index 01a5ea9d6dd0..2cfd41f7caf8 100644 --- a/pkgs/servers/soft-serve/default.nix +++ b/pkgs/servers/soft-serve/default.nix @@ -1,4 +1,4 @@ -{ lib, buildGoModule, fetchFromGitHub, makeWrapper, git, bash }: +{ lib, buildGoModule, fetchFromGitHub, makeWrapper, nixosTests, git, bash }: buildGoModule rec { pname = "soft-serve"; @@ -26,6 +26,8 @@ buildGoModule rec { --prefix PATH : "${lib.makeBinPath [ git bash ]}" ''; + passthru.tests = nixosTests.soft-serve; + meta = with lib; { description = "A tasty, self-hosted Git server for the command line"; homepage = "https://github.com/charmbracelet/soft-serve"; From 1a81fe0cc89a4eb7c28c7a6b376700c9af869709 Mon Sep 17 00:00:00 2001 From: Adam Stephens Date: Sat, 14 Oct 2023 08:18:46 -0400 Subject: [PATCH 40/57] zfs: 2.1.13 -> 2.2.0 --- .../manual/release-notes/rl-2311.section.md | 2 ++ nixos/tests/zfs.nix | 4 --- pkgs/os-specific/linux/zfs/generic.nix | 27 ++++++------------- pkgs/os-specific/linux/zfs/stable.nix | 13 +++------ 4 files changed, 13 insertions(+), 33 deletions(-) diff --git a/nixos/doc/manual/release-notes/rl-2311.section.md b/nixos/doc/manual/release-notes/rl-2311.section.md index 9a682077230c..2cdde5ec7ae7 100644 --- a/nixos/doc/manual/release-notes/rl-2311.section.md +++ b/nixos/doc/manual/release-notes/rl-2311.section.md @@ -339,6 +339,8 @@ - `jq` was updated to 1.7, its [first release in 5 years](https://github.com/jqlang/jq/releases/tag/jq-1.7). +- `zfs` was updated from 2.1.x to 2.2.0, [enabling newer kernel support and adding new features](https://github.com/openzfs/zfs/releases/tag/zfs-2.2.0). + - A new option was added to the virtualisation module that enables specifying explicitly named network interfaces in QEMU VMs. The existing `virtualisation.vlans` is still supported for cases where the name of the network interface is irrelevant. - DocBook option documentation is no longer supported, all module documentation now uses markdown. diff --git a/nixos/tests/zfs.nix b/nixos/tests/zfs.nix index 800f5e43cd15..3454fbaf78fe 100644 --- a/nixos/tests/zfs.nix +++ b/nixos/tests/zfs.nix @@ -113,8 +113,6 @@ let }; testScript = '' - # TODO: Remove this when upgrading stable to zfs 2.2.0 - unstable = ${if enableUnstable then "True" else "False"}; machine.wait_for_unit("multi-user.target") machine.succeed( "zpool status", @@ -136,8 +134,6 @@ let machine.crash() machine.wait_for_unit("multi-user.target") machine.succeed("zfs set sharesmb=on rpool/shared_smb") - if not unstable: - machine.succeed("zfs share rpool/shared_smb") machine.succeed( "smbclient -gNL localhost | grep rpool_shared_smb", "umount /tmp/mnt", diff --git a/pkgs/os-specific/linux/zfs/generic.nix b/pkgs/os-specific/linux/zfs/generic.nix index 81ff2214bcad..7bb4a1b7496e 100644 --- a/pkgs/os-specific/linux/zfs/generic.nix +++ b/pkgs/os-specific/linux/zfs/generic.nix @@ -76,25 +76,14 @@ stdenv'.mkDerivation { substituteInPlace ./config/user-systemd.m4 --replace "/usr/lib/modules-load.d" "$out/etc/modules-load.d" substituteInPlace ./config/zfs-build.m4 --replace "\$sysconfdir/init.d" "$out/etc/init.d" \ --replace "/etc/default" "$out/etc/default" - # TODO: drop when upgrading to 2.2.0 - ${if isUnstable then '' - substituteInPlace ./contrib/initramfs/Makefile.am \ - --replace "/usr/share/initramfs-tools" "$out/usr/share/initramfs-tools" - substituteInPlace ./udev/vdev_id \ - --replace "PATH=/bin:/sbin:/usr/bin:/usr/sbin" \ - "PATH=${makeBinPath [ coreutils gawk gnused gnugrep systemd ]}" - substituteInPlace ./config/zfs-build.m4 \ - --replace "bashcompletiondir=/etc/bash_completion.d" \ - "bashcompletiondir=$out/share/bash-completion/completions" - '' else '' - substituteInPlace ./etc/zfs/Makefile.am --replace "\$(sysconfdir)/zfs" "$out/etc/zfs" - - find ./contrib/initramfs -name Makefile.am -exec sed -i -e 's|/usr/share/initramfs-tools|'$out'/share/initramfs-tools|g' {} \; - - substituteInPlace ./cmd/vdev_id/vdev_id \ - --replace "PATH=/bin:/sbin:/usr/bin:/usr/sbin" \ - "PATH=${makeBinPath [ coreutils gawk gnused gnugrep systemd ]}" - ''} + substituteInPlace ./contrib/initramfs/Makefile.am \ + --replace "/usr/share/initramfs-tools" "$out/usr/share/initramfs-tools" + substituteInPlace ./udev/vdev_id \ + --replace "PATH=/bin:/sbin:/usr/bin:/usr/sbin" \ + "PATH=${makeBinPath [ coreutils gawk gnused gnugrep systemd ]}" + substituteInPlace ./config/zfs-build.m4 \ + --replace "bashcompletiondir=/etc/bash_completion.d" \ + "bashcompletiondir=$out/share/bash-completion/completions" ''; nativeBuildInputs = [ autoreconfHook269 nukeReferences ] diff --git a/pkgs/os-specific/linux/zfs/stable.nix b/pkgs/os-specific/linux/zfs/stable.nix index 1a77396300eb..3e53ba902cbd 100644 --- a/pkgs/os-specific/linux/zfs/stable.nix +++ b/pkgs/os-specific/linux/zfs/stable.nix @@ -16,20 +16,13 @@ callPackage ./generic.nix args { if stdenv'.isx86_64 || removeLinuxDRM then kernel.kernelOlder "6.6" else kernel.kernelOlder "6.2"; + latestCompatibleLinuxPackages = if stdenv'.isx86_64 || removeLinuxDRM then linuxKernel.packages.linux_6_5 else linuxKernel.packages.linux_6_1; - extraPatches = [ - # applied in version 2.2.x - (fetchpatch { - name = "musl.patch"; - url = "https://github.com/openzfs/zfs/commit/1f19826c9ac85835cbde61a7439d9d1fefe43a4a.patch"; - sha256 = "XEaK227ubfOwlB2s851UvZ6xp/QOtYUWYsKTkEHzmo0="; - }) - ]; # this package should point to the latest release. - version = "2.1.13"; + version = "2.2.0"; - sha256 = "tqUCn/Hf/eEmyWRQthWQdmTJK2sDspnHiiEfn9rz2Kc="; + sha256 = "sha256-s1sdXSrLu6uSOmjprbUa4cFsE2Vj7JX5i75e4vRnlvg="; } From 53bb653759a95ae98c9aa9389ed825384da732a1 Mon Sep 17 00:00:00 2001 From: Adam Stephens Date: Sat, 14 Oct 2023 08:19:01 -0400 Subject: [PATCH 41/57] zfsUnstable: 2.2.0-rc5 -> 2.2.1-unstable-2023-10-21 --- pkgs/os-specific/linux/zfs/unstable.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/zfs/unstable.nix b/pkgs/os-specific/linux/zfs/unstable.nix index 23882322c093..9c7e14c31bf3 100644 --- a/pkgs/os-specific/linux/zfs/unstable.nix +++ b/pkgs/os-specific/linux/zfs/unstable.nix @@ -23,9 +23,10 @@ callPackage ./generic.nix args { # IMPORTANT: Always use a tagged release candidate or commits from the # zfs--staging branch, because this is tested by the OpenZFS # maintainers. - version = "2.2.0-rc5"; + version = "2.2.1-unstable-2023-10-21"; + rev = "95785196f26e92d82cf4445654ba84e4a9671c57"; - sha256 = "sha256-97dTmSneAuhDR7LrJxG7/xPpI1hGv5mDDuq8HRTZKx0="; + sha256 = "sha256-s1sdXSrLu6uSOmjprbUa4cFsE2Vj7JX5i75e4vRnlvg="; isUnstable = true; } From b54ec5ac08641aafc6f3e14130d0268287745574 Mon Sep 17 00:00:00 2001 From: Adam Stephens Date: Mon, 16 Oct 2023 08:30:42 -0400 Subject: [PATCH 42/57] python3Packages.py-libzfs: 22.02.4 -> 22.12.4.2 --- pkgs/development/python-modules/py-libzfs/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/py-libzfs/default.nix b/pkgs/development/python-modules/py-libzfs/default.nix index 1eacc39b8ab0..d148e539d3ff 100644 --- a/pkgs/development/python-modules/py-libzfs/default.nix +++ b/pkgs/development/python-modules/py-libzfs/default.nix @@ -8,13 +8,13 @@ buildPythonPackage rec { pname = "py-libzfs"; - version = "22.02.4"; + version = "22.12.4.2"; src = fetchFromGitHub { owner = "truenas"; repo = pname; rev = "TS-${version}"; - hash = "sha256-BJG+cw07Qu4aL99pVKNd7JAgr+w/6Uv2eI46EB615/I="; + hash = "sha256-vBLbjP1gQEQNsTLc2W6uRzCFHQXZp+jGiwE0Pe8VTuw="; }; nativeBuildInputs = [ cython ]; From 7096340f9e63c67bc18c2552ad66297f29488fa9 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Sat, 21 Oct 2023 18:34:49 +0200 Subject: [PATCH 43/57] nixos/qemu-vm: Rename nixos-disk-image -> nix-store-image For the image that's actually a store image only. Helps with visibility. The name "nixos-disk-image" has no special significance, by grepping nixpkgs. --- nixos/modules/virtualisation/qemu-vm.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nixos/modules/virtualisation/qemu-vm.nix b/nixos/modules/virtualisation/qemu-vm.nix index e0004df6f6b2..737a935711ae 100644 --- a/nixos/modules/virtualisation/qemu-vm.nix +++ b/nixos/modules/virtualisation/qemu-vm.nix @@ -267,6 +267,7 @@ let }; storeImage = import ../../lib/make-disk-image.nix { + name = "nix-store-image"; inherit pkgs config lib; additionalPaths = [ regInfo ]; format = "qcow2"; From d82cd10e9aa87b834aea929e3fd2ef662b1975f1 Mon Sep 17 00:00:00 2001 From: Kai Norman Clasen Date: Sat, 21 Oct 2023 19:29:37 +0200 Subject: [PATCH 44/57] flyway: meta add `mainProgram` --- pkgs/development/tools/flyway/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/tools/flyway/default.nix b/pkgs/development/tools/flyway/default.nix index d9cffc192506..cd42388f0f82 100644 --- a/pkgs/development/tools/flyway/default.nix +++ b/pkgs/development/tools/flyway/default.nix @@ -32,6 +32,7 @@ stdenv.mkDerivation (finalAttrs: { This package is only the Community Edition of the Flyway command-line tool. ''; + mainProgram = "flyway"; downloadPage = "https://github.com/flyway/flyway"; homepage = "https://flywaydb.org/"; changelog = "https://documentation.red-gate.com/fd/release-notes-for-flyway-engine-179732572.html"; From 03cb04dca4f8d7dbb305c3d28000c46808257dcf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Forsman?= Date: Sat, 21 Oct 2023 19:34:48 +0200 Subject: [PATCH 45/57] ddclient: 3.11.0_1 -> 3.11.0 Release notes: https://github.com/ddclient/ddclient/releases/tag/v3.11.0 (The previous version was a pre-release.) --- pkgs/tools/networking/ddclient/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/networking/ddclient/default.nix b/pkgs/tools/networking/ddclient/default.nix index 6477c5b185c0..eafba0d4f527 100644 --- a/pkgs/tools/networking/ddclient/default.nix +++ b/pkgs/tools/networking/ddclient/default.nix @@ -5,7 +5,7 @@ let in perlPackages.buildPerlPackage rec { pname = "ddclient"; - version = "3.11.0_1"; + version = "3.11.0"; outputs = [ "out" ]; @@ -13,7 +13,7 @@ perlPackages.buildPerlPackage rec { owner = "ddclient"; repo = "ddclient"; rev = "v${version}"; - sha256 = "sha256-pl1kbzY5nUIvx1QiDdL9TP4vKtQnnv3RWklE4gbxXCw="; + sha256 = "sha256-s/gdTvEY4QIVidqNnN7GYrpCsp4nZ0GEH8Jv+LkSr48="; }; postPatch = '' From e2523b4ca08abf11bb706193bd8ce526c731ad21 Mon Sep 17 00:00:00 2001 From: networkException Date: Sat, 21 Oct 2023 13:02:47 +0200 Subject: [PATCH 46/57] chromium,chromedriver,electron: use hash instead of sha256 everywhere this patch updates the packaging of chromium and chromedriver to use sri hashes in `upstream-info.nix` instead of sha256 as well as the packaging of electron to use sri hashes in `info.json` instead of sha256 (just gn). this patch also updates the previous `sha256` values in `upstream-info.nix` and `info.json` to sri hashes in `hash`. --- .../networking/browsers/chromium/common.nix | 16 ++++----- .../networking/browsers/chromium/default.nix | 12 +++---- .../browsers/chromium/ungoogled.nix | 6 ++-- .../browsers/chromium/upstream-info.nix | 34 +++++++++---------- pkgs/development/tools/electron/info.json | 8 ++--- .../tools/selenium/chromedriver/default.nix | 8 ++--- 6 files changed, 42 insertions(+), 42 deletions(-) diff --git a/pkgs/applications/networking/browsers/chromium/common.nix b/pkgs/applications/networking/browsers/chromium/common.nix index 22d71e8975f8..9688bf4b096f 100644 --- a/pkgs/applications/networking/browsers/chromium/common.nix +++ b/pkgs/applications/networking/browsers/chromium/common.nix @@ -67,16 +67,16 @@ let ]); clangFormatPython3 = fetchurl { url = "https://chromium.googlesource.com/chromium/tools/build/+/e77882e0dde52c2ccf33c5570929b75b4a2a2522/recipes/recipe_modules/chromium/resources/clang-format?format=TEXT"; - sha256 = "0ic3hn65dimgfhakli1cyf9j3cxcqsf1qib706ihfhmlzxf7256l"; + hash = "sha256-1BRxXP+0QgejAWdFHJzGrLMhk/MsRDoVdK/GVoyFg0U="; }; # The additional attributes for creating derivations based on the chromium # source tree. extraAttrs = buildFun base; - githubPatch = { commit, sha256, revert ? false }: fetchpatch { + githubPatch = { commit, hash, revert ? false }: fetchpatch { url = "https://github.com/chromium/chromium/commit/${commit}.patch"; - inherit sha256 revert; + inherit hash revert; }; mkGnFlags = @@ -118,7 +118,7 @@ let libExecPath = "$out/libexec/${packageName}"; ungoogler = ungoogled-chromium { - inherit (upstream-info.deps.ungoogled-patches) rev sha256; + inherit (upstream-info.deps.ungoogled-patches) rev hash; }; # There currently isn't a (much) more concise way to get a stdenv @@ -148,10 +148,10 @@ let else throw "no chromium Rosetta Stone entry for os: ${platform.config}"; }; - recompressTarball = { version, sha256 ? "" }: fetchzip { + recompressTarball = { version, hash ? "" }: fetchzip { name = "chromium-${version}.tar.zstd"; url = "https://commondatastorage.googleapis.com/chromium-browser-official/chromium-${version}.tar.xz"; - inherit sha256; + inherit hash; nativeBuildInputs = [ zstd ]; @@ -180,7 +180,7 @@ let inherit (upstream-info) version; inherit packageName buildType buildPath; - src = recompressTarball { inherit version; inherit (upstream-info) sha256; }; + src = recompressTarball { inherit version; inherit (upstream-info) hash; }; nativeBuildInputs = [ ninja pkg-config @@ -250,7 +250,7 @@ let (githubPatch { # Reland [clang] Disable autoupgrading debug info in ThinLTO builds commit = "54969766fd2029c506befc46e9ce14d67c7ed02a"; - sha256 = "sha256-Vryjg8kyn3cxWg3PmSwYRG6zrHOqYWBMSdEMGiaPg6M="; + hash = "sha256-Vryjg8kyn3cxWg3PmSwYRG6zrHOqYWBMSdEMGiaPg6M="; revert = true; }) ]; diff --git a/pkgs/applications/networking/browsers/chromium/default.nix b/pkgs/applications/networking/browsers/chromium/default.nix index 5677bc37e844..7c2c75e74974 100644 --- a/pkgs/applications/networking/browsers/chromium/default.nix +++ b/pkgs/applications/networking/browsers/chromium/default.nix @@ -57,7 +57,7 @@ let gnChromium = buildPackages.gn.overrideAttrs (oldAttrs: { inherit (upstream-info.deps.gn) version; src = fetchgit { - inherit (upstream-info.deps.gn) url rev sha256; + inherit (upstream-info.deps.gn) url rev hash; }; }); }); @@ -80,12 +80,12 @@ let chromeSrc = let # Use the latest stable Chrome version if necessary: - version = if chromium.upstream-info.sha256bin64 != null + version = if chromium.upstream-info.hash_deb_amd64 != null then chromium.upstream-info.version else (import ./upstream-info.nix).stable.version; - sha256 = if chromium.upstream-info.sha256bin64 != null - then chromium.upstream-info.sha256bin64 - else (import ./upstream-info.nix).stable.sha256bin64; + hash = if chromium.upstream-info.hash_deb_amd64 != null + then chromium.upstream-info.hash_deb_amd64 + else (import ./upstream-info.nix).stable.hash_deb_amd64; in fetchurl { urls = map (repo: "${repo}/${pkgName}/${pkgName}_${version}-1_amd64.deb") [ "https://dl.google.com/linux/chrome/deb/pool/main/g" @@ -93,7 +93,7 @@ let "http://mirror.pcbeta.com/google/chrome/deb/pool/main/g" "http://repo.fdzh.org/chrome/deb/pool/main/g" ]; - inherit sha256; + inherit hash; }; mkrpath = p: "${lib.makeSearchPathOutput "lib" "lib64" p}:${lib.makeLibraryPath p}"; diff --git a/pkgs/applications/networking/browsers/chromium/ungoogled.nix b/pkgs/applications/networking/browsers/chromium/ungoogled.nix index 549d2853776f..cf3d0a7d73ad 100644 --- a/pkgs/applications/networking/browsers/chromium/ungoogled.nix +++ b/pkgs/applications/networking/browsers/chromium/ungoogled.nix @@ -6,10 +6,10 @@ }: { rev -, sha256 +, hash }: -stdenv.mkDerivation rec { +stdenv.mkDerivation { pname = "ungoogled-chromium"; version = rev; @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { src = fetchFromGitHub { owner = "ungoogled-software"; repo = "ungoogled-chromium"; - inherit rev sha256; + inherit rev hash; }; dontBuild = true; diff --git a/pkgs/applications/networking/browsers/chromium/upstream-info.nix b/pkgs/applications/networking/browsers/chromium/upstream-info.nix index b8004a7d4b39..29a15907cb36 100644 --- a/pkgs/applications/networking/browsers/chromium/upstream-info.nix +++ b/pkgs/applications/networking/browsers/chromium/upstream-info.nix @@ -3,63 +3,63 @@ deps = { gn = { rev = "811d332bd90551342c5cbd39e133aa276022d7f8"; - sha256 = "0jlg3d31p346na6a3yk0x29pm6b7q03ck423n5n6mi8nv4ybwajq"; + hash = "sha256-WCq+PNkWxWpssUOQyQbAZ5l6k+hg+qGMsoaMG0Ybj0o="; url = "https://gn.googlesource.com/gn"; version = "2023-08-01"; }; }; - sha256 = "0c3adrrgpnhm8g1546ask9pf17qj1sjgb950mj0rv4snxvddi75j"; - sha256bin64 = "11w1di146mjb9ql30df9yk9x4b9amc6514jzyfbf09mqsrw88dvr"; + hash = "sha256-spzY2u5Wk52BrKCk9aQOEp/gbppaGVLCQxXa+3JuajA="; + hash_deb_amd64 = "sha256-eTeEeNa4JuCW81+SUAyrKi3S0/TJNTAoTktWQ0JsgYc="; version = "117.0.5938.22"; }; dev = { deps = { gn = { rev = "cc56a0f98bb34accd5323316e0292575ff17a5d4"; - sha256 = "1ly7z48v147bfdb1kqkbc98myxpgqq3g6vgr8bjx1ikrk17l82ab"; + hash = "sha256-SwlET5h5xtDlQvlt8wbG73ZfUWJr4hlWc+uQsBH5x9M="; url = "https://gn.googlesource.com/gn"; version = "2023-08-10"; }; }; - sha256 = "16dq27lsywrn2xlgr5g46gdv15p30sihfamli4vkv3zxzfxdjisv"; - sha256bin64 = "11y09hsy7y1vg65xfilq44ffsmn15dqy80fa57psj1kin4a52v2x"; + hash = "sha256-W0fZuvv9jz03ibQqB6MG45aw2zPklfxoFzZzr+kRuJk="; + hash_deb_amd64 = "sha256-XWxRFLFxBqnvKcoB5HErwVbtHCGYRteLeTv44zVMwIc="; version = "118.0.5966.0"; }; stable = { chromedriver = { - sha256_darwin = "0y973bs4dbdrl152bfiq5avsp6h27j3v1kwgcgxk1d0g293322xs"; - sha256_darwin_aarch64 = - "04qrhr52qc9rhmslgsh2yymsix9cv32g39xbpf8576scihfdngv8"; - sha256_linux = "1hy3s6j20h03ria033kfxd3rq259davvpjny4gpvznzklns71vi1"; + hash_darwin = "sha256-ugsxRhIPtDD7Y4/PsIc8Apqrtyo4uiVKoLmtRvQaJ3k="; + hash_darwin_aarch64 = + "sha256-aD/bHIxMm1OQu6un8cTYLPWoq/cC6kd1hTkxLEqGGRM="; + hash_linux = "sha256-Ie5wtKXz27/vI97Ku7dqqQicR+tujgFUzANAIKTRw8M="; version = "118.0.5993.70"; }; deps = { gn = { rev = "cc56a0f98bb34accd5323316e0292575ff17a5d4"; - sha256 = "1ly7z48v147bfdb1kqkbc98myxpgqq3g6vgr8bjx1ikrk17l82ab"; + hash = "sha256-SwlET5h5xtDlQvlt8wbG73ZfUWJr4hlWc+uQsBH5x9M="; url = "https://gn.googlesource.com/gn"; version = "2023-08-10"; }; }; - sha256 = "sha256-CTkw92TiRD2tkYu5a5dy8fjpR2MMOMCvcbxXhJ36Bp8="; - sha256bin64 = "06rbsjh4khhl408181ns5nsdwasklb277fdjfajdv5h1j9a190k3"; + hash = "sha256-CTkw92TiRD2tkYu5a5dy8fjpR2MMOMCvcbxXhJ36Bp8="; + hash_deb_amd64 = "sha256-Y4IUVJIBlt2kcrK5c8SiUyvetC3aBhQQIBTCSaDUKxs="; version = "118.0.5993.88"; }; ungoogled-chromium = { deps = { gn = { rev = "cc56a0f98bb34accd5323316e0292575ff17a5d4"; - sha256 = "1ly7z48v147bfdb1kqkbc98myxpgqq3g6vgr8bjx1ikrk17l82ab"; + hash = "sha256-SwlET5h5xtDlQvlt8wbG73ZfUWJr4hlWc+uQsBH5x9M="; url = "https://gn.googlesource.com/gn"; version = "2023-08-10"; }; ungoogled-patches = { rev = "118.0.5993.88-1"; - sha256 = "17j47d64l97ascp85h8cnfnr5wr4va3bdk95wmagqss7ym5c7zsf"; + hash = "sha256-Tv/DSvVHa/xU5SXNtobaJPOSrbMMwYIu0+okSkw7RJ4="; }; }; - sha256 = "sha256-CTkw92TiRD2tkYu5a5dy8fjpR2MMOMCvcbxXhJ36Bp8="; - sha256bin64 = "06rbsjh4khhl408181ns5nsdwasklb277fdjfajdv5h1j9a190k3"; + hash = "sha256-CTkw92TiRD2tkYu5a5dy8fjpR2MMOMCvcbxXhJ36Bp8="; + hash_deb_amd64 = "sha256-Y4IUVJIBlt2kcrK5c8SiUyvetC3aBhQQIBTCSaDUKxs="; version = "118.0.5993.88"; }; } diff --git a/pkgs/development/tools/electron/info.json b/pkgs/development/tools/electron/info.json index 92c4ce68c63c..a3b470f78d7b 100644 --- a/pkgs/development/tools/electron/info.json +++ b/pkgs/development/tools/electron/info.json @@ -884,7 +884,7 @@ "version": "2023-09-12", "url": "https://gn.googlesource.com/gn", "rev": "991530ce394efb58fcd848195469022fa17ae126", - "sha256": "1zpbaspb2mncbsabps8n1iwzc67nhr79ndc9dnqxx1w1qfvaldg2" + "hash": "sha256-4jWqtsOBh96xbYk1m06G9hj2eQwW6buUXsxWsa5W6/4=" } } }, @@ -1776,7 +1776,7 @@ "version": "2023-08-10", "url": "https://gn.googlesource.com/gn", "rev": "cc56a0f98bb34accd5323316e0292575ff17a5d4", - "sha256": "1ly7z48v147bfdb1kqkbc98myxpgqq3g6vgr8bjx1ikrk17l82ab" + "hash": "sha256-SwlET5h5xtDlQvlt8wbG73ZfUWJr4hlWc+uQsBH5x9M=" } } }, @@ -2620,7 +2620,7 @@ "version": "2023-06-09", "url": "https://gn.googlesource.com/gn", "rev": "4bd1a77e67958fb7f6739bd4542641646f264e5d", - "sha256": "14h9jqspb86sl5lhh6q0kk2rwa9zcak63f8drp7kb3r4dx08vzsw" + "hash": "sha256-XP+NQG8kjzXPzQ25YaZiPymexZwAGwhpodqgdTWWCZI=" } } }, @@ -3440,7 +3440,7 @@ "version": "2023-04-19", "url": "https://gn.googlesource.com/gn", "rev": "5a004f9427a050c6c393c07ddb85cba8ff3849fa", - "sha256": "01xrh9m9m6x8lz0vxwdw2mrhrvnw93zpg09hwdhqakj06agf4jjk" + "hash": "sha256-U0rinjJAToVh4zCBd/9I3O4McxW88b7Bp6ibmmqCuQc=" } } }, diff --git a/pkgs/development/tools/selenium/chromedriver/default.nix b/pkgs/development/tools/selenium/chromedriver/default.nix index f17208fbfbdd..55ce40832f9e 100644 --- a/pkgs/development/tools/selenium/chromedriver/default.nix +++ b/pkgs/development/tools/selenium/chromedriver/default.nix @@ -10,17 +10,17 @@ let allSpecs = { x86_64-linux = { system = "linux64"; - sha256 = upstream-info.sha256_linux; + hash = upstream-info.hash_linux; }; x86_64-darwin = { system = "mac-x64"; - sha256 = upstream-info.sha256_darwin; + hash = upstream-info.hash_darwin; }; aarch64-darwin = { system = "mac-arm64"; - sha256 = upstream-info.sha256_darwin_aarch64; + hash = upstream-info.hash_darwin_aarch64; }; }; @@ -42,7 +42,7 @@ in stdenv.mkDerivation rec { src = fetchurl { url = "https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/${version}/${spec.system}/chromedriver-${spec.system}.zip"; - sha256 = spec.sha256; + hash = spec.hash; }; nativeBuildInputs = [ unzip makeWrapper ]; From 8d3ab4e556a43e9c9fcd49212d6a02e25b08707e Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 21 Oct 2023 14:39:58 +0200 Subject: [PATCH 47/57] python311Packages.ratelimiter: remove ratelimiter has been removed, since it is unmaintained and broken --- .../python-modules/ratelimiter/default.nix | 43 ------------------- pkgs/top-level/python-aliases.nix | 1 + pkgs/top-level/python-packages.nix | 2 - 3 files changed, 1 insertion(+), 45 deletions(-) delete mode 100644 pkgs/development/python-modules/ratelimiter/default.nix diff --git a/pkgs/development/python-modules/ratelimiter/default.nix b/pkgs/development/python-modules/ratelimiter/default.nix deleted file mode 100644 index 6c01a9e548c9..000000000000 --- a/pkgs/development/python-modules/ratelimiter/default.nix +++ /dev/null @@ -1,43 +0,0 @@ -{ lib -, buildPythonPackage -, fetchPypi -, pytest-asyncio -, pytestCheckHook -}: - -buildPythonPackage rec { - pname = "ratelimiter"; - version = "1.2.0.post0"; - format = "setuptools"; - - src = fetchPypi { - inherit pname version; - hash = "sha256-XDldyr273i5ReO8/ibVoowZkVKbdwiO3ZHPawi+JtPc="; - }; - - nativeCheckInputs = [ - pytest-asyncio - pytestCheckHook - ]; - - pythonImportsCheck = [ - "ratelimiter" - ]; - - preCheck = '' - # Uses out-dated options - rm tests/conftest.py - ''; - - disabledTests = [ - # TypeError: object Lock can't be used in 'await' expression - "test_alock" - ]; - - meta = with lib; { - description = "Simple python rate limiting object"; - homepage = "https://github.com/RazerM/ratelimiter"; - license = licenses.asl20; - maintainers = with maintainers; [ helkafen ]; - }; -} diff --git a/pkgs/top-level/python-aliases.nix b/pkgs/top-level/python-aliases.nix index 4e679de15084..164475b96eb8 100644 --- a/pkgs/top-level/python-aliases.nix +++ b/pkgs/top-level/python-aliases.nix @@ -354,6 +354,7 @@ mapAliases ({ Quandl = quandl; # added 2023-02-19 qiskit-aqua = throw "qiskit-aqua has been removed due to deprecation, with its functionality moved to different qiskit packages"; rabbitpy = throw "rabbitpy has been removed, since it is unmaintained and broken"; # added 2023-07-01 + ratelimiter = throw "ratelimiter has been removed, since it is unmaintained and broken"; # added 2023-10-21 rdflib-jsonld = throw "rdflib-jsonld is not compatible with rdflib 6"; # added 2021-11-05 recaptcha_client = throw "recaptcha_client has been removed since it is no longer maintained"; # added 2023-10-20 rednose = throw "rednose is no longer maintained (since February 2018)"; # added 2023-08-06 diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index ac62b89f9882..57c9a0eb33df 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -11995,8 +11995,6 @@ self: super: with self; { ratelimit = callPackage ../development/python-modules/ratelimit { }; - ratelimiter = callPackage ../development/python-modules/ratelimiter { }; - rauth = callPackage ../development/python-modules/rauth { }; raven = callPackage ../development/python-modules/raven { }; From 2fd6c3a3aa72874d1e806cc6b54d2d041e762439 Mon Sep 17 00:00:00 2001 From: Kai Norman Clasen Date: Sat, 21 Oct 2023 19:37:07 +0200 Subject: [PATCH 48/57] pgbouncer: meta add `mainProgram` --- pkgs/servers/sql/pgbouncer/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/servers/sql/pgbouncer/default.nix b/pkgs/servers/sql/pgbouncer/default.nix index 7f6cfa0f898a..dd47de907576 100644 --- a/pkgs/servers/sql/pgbouncer/default.nix +++ b/pkgs/servers/sql/pgbouncer/default.nix @@ -19,6 +19,7 @@ stdenv.mkDerivation rec { meta = with lib; { homepage = "https://www.pgbouncer.org/"; + mainProgram = "pgbouncer"; description = "Lightweight connection pooler for PostgreSQL"; changelog = "https://github.com/pgbouncer/pgbouncer/releases/tag/pgbouncer_${replaceStrings ["."] ["_"] version}"; license = licenses.isc; From 4d513ab5f170d66afa3387bdd718d41aa936ee9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christina=20S=C3=B8rensen?= Date: Tue, 17 Oct 2023 20:22:43 +0200 Subject: [PATCH 49/57] nushell: 0.85.0 -> 0.86.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christina Sørensen --- pkgs/shells/nushell/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/shells/nushell/default.nix b/pkgs/shells/nushell/default.nix index 34b8f9504f8b..acd7494fd3cc 100644 --- a/pkgs/shells/nushell/default.nix +++ b/pkgs/shells/nushell/default.nix @@ -22,7 +22,7 @@ }: let - version = "0.85.0"; + version = "0.86.0"; in rustPlatform.buildRustPackage { @@ -33,10 +33,10 @@ rustPlatform.buildRustPackage { owner = "nushell"; repo = "nushell"; rev = version; - hash = "sha256-/c3JTgIT+T41D0S7irQ0jq2MDzmx3os4pYpVr10cL3E="; + hash = "sha256-jUZKqsu0/RO4mc+hzjis1mNrohj1JzM17Z8e2Ggxlfs="; }; - cargoHash = "sha256-lBipwX72j0Af3PCat18s9NIjJiKZFZTcU9Utwt+eQzI="; + cargoHash = "sha256-WDGhuc2ZGDwfh7X/oRTZLzmKPj1jSnQFL4sy7KYt5Js="; nativeBuildInputs = [ pkg-config ] ++ lib.optionals (withDefaultFeatures && stdenv.isLinux) [ python3 ] From a26cc51f231fdb21e312feeb84d013b6b7851153 Mon Sep 17 00:00:00 2001 From: Paul Grandperrin Date: Sat, 21 Oct 2023 20:45:18 +0200 Subject: [PATCH 50/57] rclone: add filesystem helpers (#258487) This adds two symlinks to rclone: rclonefs and mount.rclone fixes #258478 --- pkgs/applications/networking/sync/rclone/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/applications/networking/sync/rclone/default.nix b/pkgs/applications/networking/sync/rclone/default.nix index 2e6dd8fa7fde..cad0829b9c2b 100644 --- a/pkgs/applications/networking/sync/rclone/default.nix +++ b/pkgs/applications/networking/sync/rclone/default.nix @@ -41,6 +41,10 @@ buildGoModule rec { ${rcloneBin}/bin/rclone genautocomplete $shell rclone.$shell installShellCompletion rclone.$shell done + + # filesystem helpers + ln -s $out/bin/rclone $out/bin/rclonefs + ln -s $out/bin/rclone $out/bin/mount.rclone '' + lib.optionalString (enableCmount && !stdenv.isDarwin) # use --suffix here to ensure we don't shadow /run/wrappers/bin/fusermount, # as the setuid wrapper is required as non-root on NixOS. From 27cfb8a1aba4ba58a2c42d0bb1bd8a04aeaf6881 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sat, 21 Oct 2023 19:14:05 +0000 Subject: [PATCH 51/57] unciv: 4.8.9-patch2 -> 4.8.13 --- pkgs/games/unciv/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/games/unciv/default.nix b/pkgs/games/unciv/default.nix index f4b350ad38e7..70971fb1ad37 100644 --- a/pkgs/games/unciv/default.nix +++ b/pkgs/games/unciv/default.nix @@ -25,11 +25,11 @@ let in stdenv.mkDerivation rec { pname = "unciv"; - version = "4.8.9-patch2"; + version = "4.8.13"; src = fetchurl { url = "https://github.com/yairm210/Unciv/releases/download/${version}/Unciv.jar"; - hash = "sha256-ek2FDzo7EbgZGbQyZ6mBmVoPRKkJu0JFewbVvsGzZMA="; + hash = "sha256-16TpsKNLcm6lbi4exYxDZWfmRsvfAhT1ktP36zC9Psg="; }; dontUnpack = true; From 51d906d2341c9e866e48c2efcaac0f2d70bfd43e Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Thu, 19 Oct 2023 04:30:33 +0000 Subject: [PATCH 52/57] sacc: 1.06 -> 1.07 --- pkgs/applications/networking/gopher/sacc/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/gopher/sacc/default.nix b/pkgs/applications/networking/gopher/sacc/default.nix index 994423870398..686f671e13a5 100644 --- a/pkgs/applications/networking/gopher/sacc/default.nix +++ b/pkgs/applications/networking/gopher/sacc/default.nix @@ -4,11 +4,11 @@ stdenv.mkDerivation rec { pname = "sacc"; - version = "1.06"; + version = "1.07"; src = fetchurl { url = "ftp://bitreich.org/releases/sacc/sacc-${version}.tar.gz"; - hash = "sha512-eoleQy4dKLfZsrsqUybKMjUIdqLIDTncbBnnU0fXKkhH8apP8R8H6Kmt6hTqcbhNcIkNzBcP9s4Ld54dZYa0+g=="; + hash = "sha256-LdEeZH+JWb7iEEzikAXaxG0N5GMPxjgTId4THLgdU2w="; }; inherit patches; From 13b98764bbeee2a64ae147fce310eda8488af97a Mon Sep 17 00:00:00 2001 From: Einherjar Date: Sat, 21 Oct 2023 16:51:17 -0300 Subject: [PATCH 53/57] yazi: 0.1.4 -> 0.1.5 (#262500) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: éclairevoyant <848000+eclairevoyant@users.noreply.github.com> --- pkgs/applications/file-managers/yazi/default.nix | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/file-managers/yazi/default.nix b/pkgs/applications/file-managers/yazi/default.nix index 7757a1322b15..cd0476c1e00d 100644 --- a/pkgs/applications/file-managers/yazi/default.nix +++ b/pkgs/applications/file-managers/yazi/default.nix @@ -3,6 +3,7 @@ , lib , makeWrapper +, installShellFiles , stdenv , Foundation @@ -30,18 +31,18 @@ rustPlatform.buildRustPackage rec { pname = "yazi"; - version = "0.1.4"; + version = "0.1.5"; src = fetchFromGitHub { owner = "sxyazi"; repo = pname; rev = "v${version}"; - hash = "sha256-ARpludMVQlZtCRAfW0cNYVmT3m9t9lunMIW24peYX6Y="; + hash = "sha256-FhKrq4N32uJRHGc0qRl+CIVNRW597jACcTFEgj8hiSE="; }; - cargoHash = "sha256-dhdk5aGKv6tY8x7MmA0hWcmJBiXOXC92DlQTd/1AKtQ="; + cargoHash = "sha256-YUymZhDp1Pjm+W6m8Vmh2AgMCdaNt6TQQpiJwSg/gPw="; - nativeBuildInputs = [ makeWrapper ]; + nativeBuildInputs = [ makeWrapper installShellFiles ]; buildInputs = lib.optionals stdenv.isDarwin [ Foundation ]; postInstall = with lib; @@ -60,6 +61,10 @@ rustPlatform.buildRustPackage rec { '' wrapProgram $out/bin/yazi \ --prefix PATH : "${makeBinPath runtimePaths}" + installShellCompletion --cmd yazi \ + --bash ./config/completions/yazi.bash \ + --fish ./config/completions/yazi.fish \ + --zsh ./config/completions/_yazi ''; passthru.updateScript = nix-update-script { }; From d1df9108ba701b9a02945182e60da0a0201d2464 Mon Sep 17 00:00:00 2001 From: Rishi Desai Date: Tue, 25 Jul 2023 12:45:41 -0500 Subject: [PATCH 54/57] nixos/fanout: init fanout oneshot module --- nixos/modules/config/fanout.nix | 49 +++++++++++++++++++++++++++++++++ nixos/modules/module-list.nix | 1 + 2 files changed, 50 insertions(+) create mode 100644 nixos/modules/config/fanout.nix diff --git a/nixos/modules/config/fanout.nix b/nixos/modules/config/fanout.nix new file mode 100644 index 000000000000..60ee145f19af --- /dev/null +++ b/nixos/modules/config/fanout.nix @@ -0,0 +1,49 @@ +{ config, lib, pkgs, ... }: +let + cfg = config.services.fanout; + mknodCmds = n: lib.lists.imap0 (i: s: + "mknod /dev/fanout${builtins.toString i} c $MAJOR ${builtins.toString i}" + ) (lib.lists.replicate n ""); +in +{ + options.services.fanout = { + enable = lib.mkEnableOption (lib.mdDoc "fanout"); + fanoutDevices = lib.mkOption { + type = lib.types.int; + default = 1; + description = "Number of /dev/fanout devices"; + }; + bufferSize = lib.mkOption { + type = lib.types.int; + default = 16384; + description = "Size of /dev/fanout buffer in bytes"; + }; + }; + + config = lib.mkIf cfg.enable { + boot.extraModulePackages = [ config.boot.kernelPackages.fanout.out ]; + + boot.kernelModules = [ "fanout" ]; + + boot.extraModprobeConfig = '' + options fanout buffersize=${builtins.toString cfg.bufferSize} + ''; + + systemd.services.fanout = { + description = "Bring up /dev/fanout devices"; + script = '' + MAJOR=$(${pkgs.gnugrep}/bin/grep fanout /proc/devices | ${pkgs.gawk}/bin/awk '{print $1}') + ${lib.strings.concatLines (mknodCmds cfg.fanoutDevices)} + ''; + + wantedBy = [ "multi-user.target" ]; + + serviceConfig = { + Type = "oneshot"; + User = "root"; + RemainAfterExit = "yes"; + Restart = "no"; + }; + }; + }; +} diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index b32783d4e2e6..395a638033fe 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -2,6 +2,7 @@ ./config/appstream.nix ./config/console.nix ./config/debug-info.nix + ./config/fanout.nix ./config/fonts/fontconfig.nix ./config/fonts/fontdir.nix ./config/fonts/ghostscript.nix From 52effd56af02623fa2d2177430c8a1d2606bcbdb Mon Sep 17 00:00:00 2001 From: Rishi Desai Date: Tue, 25 Jul 2023 12:45:54 -0500 Subject: [PATCH 55/57] nixos/fanout: add test --- nixos/tests/all-tests.nix | 1 + nixos/tests/fanout.nix | 30 ++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 nixos/tests/fanout.nix diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 9c62021a5cde..ef98efd7dbca 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -272,6 +272,7 @@ in { fail2ban = handleTest ./fail2ban.nix { }; fakeroute = handleTest ./fakeroute.nix {}; fancontrol = handleTest ./fancontrol.nix {}; + fanout = handleTest ./fanout.nix {}; fcitx5 = handleTest ./fcitx5 {}; fenics = handleTest ./fenics.nix {}; ferm = handleTest ./ferm.nix {}; diff --git a/nixos/tests/fanout.nix b/nixos/tests/fanout.nix new file mode 100644 index 000000000000..c36d34dcce0b --- /dev/null +++ b/nixos/tests/fanout.nix @@ -0,0 +1,30 @@ +{ system ? builtins.currentSystem +, config ? {} +, pkgs ? import ../.. { inherit system config; } +}: +import ./make-test-python.nix ({lib, pkgs, ...}: { + name = "fanout"; + meta.maintainers = [ lib.maintainers.therishidesai ]; + + nodes = let + cfg = { ... }: { + services.fanout = { + enable = true; + fanoutDevices = 2; + bufferSize = 8192; + }; + }; + in { + machine = cfg; + }; + + testScript = '' + start_all() + + # mDNS. + machine.wait_for_unit("multi-user.target") + + machine.succeed("test -c /dev/fanout0") + machine.succeed("test -c /dev/fanout1") + ''; +}) From cf9cf455783117075b678374693342dc1c6e804d Mon Sep 17 00:00:00 2001 From: Auguste Baum <52001167+augustebaum@users.noreply.github.com> Date: Sat, 21 Oct 2023 22:56:17 +0200 Subject: [PATCH 56/57] rustfmt: add `meta.mainProgram` --- pkgs/development/compilers/rust/rustfmt.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/compilers/rust/rustfmt.nix b/pkgs/development/compilers/rust/rustfmt.nix index b53be1633d56..40f6237dbe98 100644 --- a/pkgs/development/compilers/rust/rustfmt.nix +++ b/pkgs/development/compilers/rust/rustfmt.nix @@ -38,6 +38,7 @@ rustPlatform.buildRustPackage rec { description = "A tool for formatting Rust code according to style guidelines"; homepage = "https://github.com/rust-lang-nursery/rustfmt"; license = with licenses; [ mit asl20 ]; + mainProgram = "rustfmt"; maintainers = with maintainers; [ globin basvandijk ]; }; } From 57436cf549be6214e90ff99245e4f75b0469de02 Mon Sep 17 00:00:00 2001 From: Ivan Jager Date: Sat, 21 Oct 2023 16:29:13 -0500 Subject: [PATCH 57/57] nixos/firefox: Fix package references https://github.com/NixOS/nixpkgs/pull/262017 removed `with pkgs;` so setting `programs.firefox.enable = true` resulted in evaluation errors like `error: undefined variable 'ff2mpv'` This still doesn't fix https://github.com/NixOS/nixpkgs/issues/262600 --- nixos/modules/programs/firefox.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/nixos/modules/programs/firefox.nix b/nixos/modules/programs/firefox.nix index 99236f01c537..813e0e0105f6 100644 --- a/nixos/modules/programs/firefox.nix +++ b/nixos/modules/programs/firefox.nix @@ -224,11 +224,11 @@ in extraPrefs = cfg.autoConfig; extraNativeMessagingHosts = old.extraNativeMessagingHosts or [] - ++ optional nmh.ff2mpv ff2mpv - ++ optional nmh.euwebid web-eid-app - ++ optional nmh.gsconnect gnomeExtensions.gsconnect - ++ optional nmh.jabref jabref - ++ optional nmh.passff passff-host; + ++ optional nmh.ff2mpv pkgs.ff2mpv + ++ optional nmh.euwebid pkgs.web-eid-app + ++ optional nmh.gsconnect pkgs.gnomeExtensions.gsconnect + ++ optional nmh.jabref pkgs.jabref + ++ optional nmh.passff pkgs.passff-host; cfg = let # copy-pasted from the wrapper; TODO: figure out fix applicationName = cfg.package.binaryName or (lib.getName cfg.package);