diff --git a/nixos/maintainers/scripts/ec2/amazon-image.nix b/nixos/maintainers/scripts/ec2/amazon-image.nix index 6942b58f236e..e5aca9fe20f0 100644 --- a/nixos/maintainers/scripts/ec2/amazon-image.nix +++ b/nixos/maintainers/scripts/ec2/amazon-image.nix @@ -104,8 +104,8 @@ in { ${pkgs.jq}/bin/jq -n \ --arg system_label ${lib.escapeShellArg config.system.nixos.label} \ --arg system ${lib.escapeShellArg pkgs.stdenv.hostPlatform.system} \ - --arg root_logical_bytes "$(${pkgs.qemu}/bin/qemu-img info --output json "$bootDisk" | ${pkgs.jq}/bin/jq '."virtual-size"')" \ - --arg boot_logical_bytes "$(${pkgs.qemu}/bin/qemu-img info --output json "$rootDisk" | ${pkgs.jq}/bin/jq '."virtual-size"')" \ + --arg root_logical_bytes "$(${pkgs.qemu}/bin/qemu-img info --output json "$rootDisk" | ${pkgs.jq}/bin/jq '."virtual-size"')" \ + --arg boot_logical_bytes "$(${pkgs.qemu}/bin/qemu-img info --output json "$bootDisk" | ${pkgs.jq}/bin/jq '."virtual-size"')" \ --arg root "$rootDisk" \ --arg boot "$bootDisk" \ '{} diff --git a/nixos/maintainers/scripts/ec2/create-amis.sh b/nixos/maintainers/scripts/ec2/create-amis.sh index 691d7fcfcba4..712d9b548ff0 100755 --- a/nixos/maintainers/scripts/ec2/create-amis.sh +++ b/nixos/maintainers/scripts/ec2/create-amis.sh @@ -15,18 +15,22 @@ # set -x set -euo pipefail -# configuration -state_dir=$HOME/amis/ec2-images -home_region=eu-west-1 -bucket=nixos-amis -service_role_name=vmimport +var () { true; } -regions=(eu-west-1 eu-west-2 eu-west-3 eu-central-1 eu-north-1 +# configuration +var ${state_dir:=$HOME/amis/ec2-images} +var ${home_region:=eu-west-1} +var ${bucket:=nixos-amis} +var ${service_role_name:=vmimport} + +var ${regions:=eu-west-1 eu-west-2 eu-west-3 eu-central-1 eu-north-1 us-east-1 us-east-2 us-west-1 us-west-2 ca-central-1 ap-southeast-1 ap-southeast-2 ap-northeast-1 ap-northeast-2 ap-south-1 ap-east-1 - sa-east-1) + sa-east-1} + +regions=($regions) log() { echo "$@" >&2 @@ -60,10 +64,16 @@ read_image_info() { # We handle a single image per invocation, store all attributes in # globals for convenience. -image_label=$(read_image_info .label) +zfs_disks=$(read_image_info .disks) +image_label="$(read_image_info .label)${zfs_disks:+-ZFS}" image_system=$(read_image_info .system) -image_file=$(read_image_info .file) -image_logical_bytes=$(read_image_info .logical_bytes) +image_files=( $(read_image_info "${zfs_disks:+.disks.root}.file") ) + +image_logical_bytes=$(read_image_info "${zfs_disks:+.disks.boot}.logical_bytes") + +if [[ -n "$zfs_disks" ]]; then + image_files+=( $(read_image_info .disks.boot.file) ) +fi # Derived attributes @@ -113,11 +123,11 @@ wait_for_import() { local state snapshot_id log "Waiting for import task $task_id to be completed" while true; do - read -r state progress snapshot_id < <( + read -r state message snapshot_id < <( aws ec2 describe-import-snapshot-tasks --region "$region" --import-task-ids "$task_id" | \ - jq -r '.ImportSnapshotTasks[].SnapshotTaskDetail | "\(.Status) \(.Progress) \(.SnapshotId)"' + jq -r '.ImportSnapshotTasks[].SnapshotTaskDetail | "\(.Status) \(.StatusMessage) \(.SnapshotId)"' ) - log " ... state=$state progress=$progress snapshot_id=$snapshot_id" + log " ... state=$state message=$message snapshot_id=$snapshot_id" case "$state" in active) sleep 10 @@ -179,41 +189,48 @@ make_image_public() { upload_image() { local region=$1 - local aws_path=${image_file#/} + for image_file in "${image_files[@]}"; do + local aws_path=${image_file#/} - local state_key="$region.$image_label.$image_system" - local task_id - task_id=$(read_state "$state_key" task_id) - local snapshot_id - snapshot_id=$(read_state "$state_key" snapshot_id) - local ami_id - ami_id=$(read_state "$state_key" ami_id) - - if [ -z "$task_id" ]; then - log "Checking for image on S3" - if ! aws s3 ls --region "$region" "s3://${bucket}/${aws_path}" >&2; then - log "Image missing from aws, uploading" - aws s3 cp --region "$region" "$image_file" "s3://${bucket}/${aws_path}" >&2 + if [[ -n "$zfs_disks" ]]; then + local suffix=${image_file%.*} + suffix=${suffix##*.} fi - log "Importing image from S3 path s3://$bucket/$aws_path" + local state_key="$region.$image_label${suffix:+.${suffix}}.$image_system" + local task_id + task_id=$(read_state "$state_key" task_id) + local snapshot_id + snapshot_id=$(read_state "$state_key" snapshot_id) + local ami_id + ami_id=$(read_state "$state_key" ami_id) - task_id=$(aws ec2 import-snapshot --role-name "$service_role_name" --disk-container "{ - \"Description\": \"nixos-image-${image_label}-${image_system}\", - \"Format\": \"vhd\", - \"UserBucket\": { - \"S3Bucket\": \"$bucket\", - \"S3Key\": \"$aws_path\" - } - }" --region "$region" | jq -r '.ImportTaskId') + if [ -z "$task_id" ]; then + log "Checking for image on S3" + if ! aws s3 ls --region "$region" "s3://${bucket}/${aws_path}" >&2; then + log "Image missing from aws, uploading" + aws s3 cp --region "$region" "$image_file" "s3://${bucket}/${aws_path}" >&2 + fi - write_state "$state_key" task_id "$task_id" - fi + log "Importing image from S3 path s3://$bucket/$aws_path" - if [ -z "$snapshot_id" ]; then - snapshot_id=$(wait_for_import "$region" "$task_id") - write_state "$state_key" snapshot_id "$snapshot_id" - fi + task_id=$(aws ec2 import-snapshot --role-name "$service_role_name" --disk-container "{ + \"Description\": \"nixos-image-${image_label}-${image_system}\", + \"Format\": \"vhd\", + \"UserBucket\": { + \"S3Bucket\": \"$bucket\", + \"S3Key\": \"$aws_path\" + } + }" --region "$region" | jq -r '.ImportTaskId') + + write_state "$state_key" task_id "$task_id" + fi + + if [ -z "$snapshot_id" ]; then + snapshot_id=$(wait_for_import "$region" "$task_id") + write_state "$state_key" snapshot_id "$snapshot_id" + fi + done if [ -z "$ami_id" ]; then log "Registering snapshot $snapshot_id as AMI" @@ -222,6 +239,18 @@ upload_image() { "DeviceName=/dev/xvda,Ebs={SnapshotId=$snapshot_id,VolumeSize=$image_logical_gigabytes,DeleteOnTermination=true,VolumeType=gp3}" ) + if [[ -n "$zfs_disks" ]]; then + local root_snapshot_id=$(read_state "$region.$image_label.root.$image_system" snapshot_id) + + local root_image_logical_bytes=$(read_image_info ".disks.root.logical_bytes") + local root_image_logical_gigabytes=$(((root_image_logical_bytes-1)/1024/1024/1024+1)) # Round to the next GB + + block_device_mappings+=( + "DeviceName=/dev/xvdb,Ebs={SnapshotId=$root_snapshot_id,VolumeSize=$root_image_logical_gigabytes,DeleteOnTermination=true,VolumeType=gp3}" + ) + fi + + local extra_flags=( --root-device-name /dev/xvda --sriov-net-support simple @@ -248,7 +277,7 @@ upload_image() { write_state "$state_key" ami_id "$ami_id" fi - make_image_public "$region" "$ami_id" + [[ -v PRIVATE ]] || make_image_public "$region" "$ami_id" echo "$ami_id" } @@ -276,7 +305,7 @@ copy_to_region() { write_state "$state_key" ami_id "$ami_id" fi - make_image_public "$region" "$ami_id" + [[ -v PRIVATE ]] || make_image_public "$region" "$ami_id" echo "$ami_id" } diff --git a/pkgs/applications/networking/cluster/rancher/default.nix b/pkgs/applications/networking/cluster/rancher/default.nix new file mode 100644 index 000000000000..665b2091edc6 --- /dev/null +++ b/pkgs/applications/networking/cluster/rancher/default.nix @@ -0,0 +1,41 @@ +{ lib, buildGoModule, fetchFromGitHub }: + +buildGoModule rec { + pname = "rancher-cli"; + version = "2.4.13"; + + src = fetchFromGitHub { + owner = "rancher"; + repo = "cli"; + rev = "v${version}"; + sha256 = "sha256-tkAnbQP35P+ZEE/WTpjgjdmvt0eJ0esKJ+I21cWraEI="; + }; + + ldflags = [ + "-w" + "-s" + "-X main.VERSION=${version}" + "-extldflags" + "-static" + ]; + + vendorSha256 = "sha256-agXztvvrMEoa6bo/bQr3qhinOSj7bFnZ4kzTx4F0VxQ="; + + postInstall = '' + mv $out/bin/cli $out/bin/rancher + ''; + + doCheck = true; + + doInstallCheck = true; + installCheckPhase = '' + $out/bin/rancher | grep ${version} > /dev/null + ''; + + meta = with lib; { + description = "The Rancher Command Line Interface (CLI) is a unified tool for interacting with your Rancher Server"; + homepage = "https://github.com/rancher/cli"; + license = licenses.asl20; + maintainers = with maintainers; [ bryanasdev000 ]; + }; +} diff --git a/pkgs/applications/radio/flex-ncat/default.nix b/pkgs/applications/radio/flex-ncat/default.nix new file mode 100644 index 000000000000..360769a44dda --- /dev/null +++ b/pkgs/applications/radio/flex-ncat/default.nix @@ -0,0 +1,22 @@ +{ lib, buildGoModule, fetchFromGitHub }: + +buildGoModule rec { + pname = "flex-ncat"; + version = "0.0-20210420.0"; + + src = fetchFromGitHub { + owner = "kc2g-flex-tools"; + repo = "nCAT"; + rev = "v${version}"; + sha256 = "0wrdmlp9rrr4n0g9pj0j20ddskllyr59dr3p5fm9z0avkncn3a0m"; + }; + + vendorSha256 = "0npzhvpyaxvfaivycnscvh45lp0ycdg9xrlfm8vhfr835yj2adiv"; + + meta = with lib; { + homepage = "https://github.com/kc2g-flex-tools/nCAT"; + description = "FlexRadio remote control (CAT) via hamlib/rigctl protocol"; + license = licenses.mit; + maintainers = with maintainers; [ mvs ]; + }; +} diff --git a/pkgs/applications/radio/flex-ndax/default.nix b/pkgs/applications/radio/flex-ndax/default.nix new file mode 100644 index 000000000000..4d27907cdd18 --- /dev/null +++ b/pkgs/applications/radio/flex-ndax/default.nix @@ -0,0 +1,24 @@ +{ lib, buildGoModule, fetchFromGitHub, pulseaudio }: + +buildGoModule rec { + pname = "flex-ndax"; + version = "0.1-20210714.0"; + + src = fetchFromGitHub { + owner = "kc2g-flex-tools"; + repo = "nDAX"; + rev = "v${version}"; + sha256 = "16zx6kbax59rcxyz9dhq7m8yx214knz3xayna1gzb85m6maly8v8"; + }; + + buildInputs = [ pulseaudio ]; + + vendorSha256 = "0qn8vg84j9kp0ycn24lkaqjnnk339j3vis4bn48ia3z5vfc22gi5"; + + meta = with lib; { + homepage = "https://github.com/kc2g-flex-tools/nDAX"; + description = "FlexRadio digital audio transport (DAX) connector for PulseAudio"; + license = licenses.mit; + maintainers = with maintainers; [ mvs ]; + }; +} diff --git a/pkgs/applications/version-management/git-and-tools/git-extras/default.nix b/pkgs/applications/version-management/git-and-tools/git-extras/default.nix index d57fe657517b..2037122bf277 100644 --- a/pkgs/applications/version-management/git-and-tools/git-extras/default.nix +++ b/pkgs/applications/version-management/git-and-tools/git-extras/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "git-extras"; - version = "6.2.0"; + version = "6.3.0"; src = fetchFromGitHub { owner = "tj"; repo = "git-extras"; rev = version; - sha256 = "sha256-ACuTb1DGft2/32Ezg23jhpl9yua5kUTZ2kKL8KHU+BU="; + sha256 = "sha256-mmvDsK+SgBXQSKNKuPt+K4sgtdrtqPx9Df2E3kKLdJM="; }; postPatch = '' @@ -37,6 +37,6 @@ stdenv.mkDerivation rec { description = "GIT utilities -- repo summary, repl, changelog population, author commit percentages and more"; license = licenses.mit; platforms = platforms.all; - maintainers = with maintainers; [ spwhitt cko ]; + maintainers = with maintainers; [ spwhitt cko SuperSandro2000 ]; }; } diff --git a/pkgs/applications/version-management/got/default.nix b/pkgs/applications/version-management/got/default.nix new file mode 100644 index 000000000000..b80712fd96da --- /dev/null +++ b/pkgs/applications/version-management/got/default.nix @@ -0,0 +1,41 @@ +{ lib, stdenv, fetchurl, pkg-config, openssl, libuuid, libmd, zlib, ncurses }: + +stdenv.mkDerivation rec { + pname = "got"; + version = "0.60"; + + src = fetchurl { + url = + "https://gameoftrees.org/releases/portable/got-portable-${version}.tar.gz"; + sha256 = "sha256-tT8F3Kx7Rcjd/tWjIXXNWygYlkMddWwrttpjnYLnBdo="; + }; + + nativeBuildInputs = [ pkg-config ]; + + buildInputs = [ openssl libuuid libmd zlib ncurses ]; + + doInstallCheck = true; + + installCheckPhase = '' + runHook preInstallCheck + test "$($out/bin/got --version)" = '${pname} "${version}"' + runHook postInstallCheck + ''; + + meta = with lib; { + description = "A version control system which prioritizes ease of use and simplicity over flexibility"; + longDescription = '' + Game of Trees (Got) is a version control system which prioritizes + ease of use and simplicity over flexibility. + + Got uses Git repositories to store versioned data. Git can be used + for any functionality which has not yet been implemented in + Got. It will always remain possible to work with both Got and Git + on the same repository. + ''; + homepage = "https://gameoftrees.org"; + license = licenses.isc; + platforms = platforms.all; + maintainers = with maintainers; [ abbe ]; + }; +} diff --git a/pkgs/development/interpreters/bqn/cbqn/001-remove-vendoring.diff b/pkgs/development/interpreters/bqn/cbqn/001-remove-vendoring.diff index d3f7f497fcb8..253740df8b88 100644 --- a/pkgs/development/interpreters/bqn/cbqn/001-remove-vendoring.diff +++ b/pkgs/development/interpreters/bqn/cbqn/001-remove-vendoring.diff @@ -9,7 +9,7 @@ index a5f3d75..f617e25 100644 - @echo "Copying precompiled bytecode from the bytecode branch" - git checkout remotes/origin/bytecode src/gen/{compiler,formatter,runtime0,runtime1,src} - git reset src/gen/{compiler,formatter,runtime0,runtime1,src} -+ echo "src/gen/ files retrieved externally" ++ @echo "src/gen/ files retrieved externally" ${bd}/load.o: src/gen/customRuntime -include $(bd)/*.d diff --git a/pkgs/development/interpreters/bqn/cbqn/default.nix b/pkgs/development/interpreters/bqn/cbqn/default.nix index e80844f1b724..68bd9a2b8740 100644 --- a/pkgs/development/interpreters/bqn/cbqn/default.nix +++ b/pkgs/development/interpreters/bqn/cbqn/default.nix @@ -1,33 +1,30 @@ { lib , stdenv , fetchFromGitHub +, genBytecode ? false , bqn-path ? null +, mbqn-source ? null }: let - mlochbaum-bqn = fetchFromGitHub { - owner = "mlochbaum"; - repo = "BQN"; - rev = "97cbdc67fe6a9652c42daefadd658cc41c1e5ae3"; - hash = "sha256-F2Bv3n3C7zAhqKCMB6hT2iIWTjEqFdLBMyX6/w7V1SY="; + cbqn-bytecode-files = fetchFromGitHub { + name = "cbqn-bytecode-files"; + owner = "dzaima"; + repo = "CBQN"; + rev = "94bb312d20919f942eabed3dca33c514de3c3227"; + hash = "sha256-aFw5/F7/sYkYmxAnGeK8EwkoVrbEcjuJAD9YT+iW9Rw="; }; in +assert genBytecode -> ((bqn-path != null) && (mbqn-source != null)); stdenv.mkDerivation rec { - pname = "cbqn"; - version = "0.0.0+unstable=2021-09-29"; + pname = "cbqn" + lib.optionalString (!genBytecode) "-standalone"; + version = "0.0.0+unstable=2021-10-01"; src = fetchFromGitHub { owner = "dzaima"; repo = "CBQN"; - rev = "1c83483d5395e097f60de299274ebe0df590217e"; - hash = "sha256-C34DpXab08mBm2oCQuaeq4fJPtQ5rVa/HlpL/nB9XjQ="; - }; - - cbqn-bytecode = fetchFromGitHub { - owner = "dzaima"; - repo = "CBQN"; - rev = "fdf0b93409d68d5ffd86c5670db27c240e6039e0"; - hash = "sha256-A0zvpg+G37WNgyfrJuc5rH6L7Wntdbrz8pYEPreqgKE="; + rev = "3725bd58c758a749653080319766a33169551536"; + hash = "sha256-xWp64inFZRqGGTrH6Hqbj7aA0vYPyd+FdetowTMTjPs="; }; dontConfigure = true; @@ -42,17 +39,16 @@ stdenv.mkDerivation rec { ''; preBuild = - if bqn-path == null + if genBytecode then '' - cp ${cbqn-bytecode}/src/gen/{compiler,formatter,runtime0,runtime1,src} src/gen/ + ${bqn-path} genRuntime ${mbqn-source} '' else '' - ${bqn-path} genRuntime ${mlochbaum-bqn} + cp ${cbqn-bytecode-files}/src/gen/{compiler,formatter,runtime0,runtime1,src} src/gen/ ''; makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" - "single-o3" ]; installPhase = '' @@ -70,9 +66,10 @@ stdenv.mkDerivation rec { homepage = "https://github.com/dzaima/CBQN/"; description = "BQN implementation in C"; license = licenses.gpl3Plus; - maintainers = with maintainers; [ AndersonTorres ]; + maintainers = with maintainers; [ AndersonTorres sternenseemann synthetica ]; platforms = platforms.all; + priority = if genBytecode then 0 else 10; }; } -# TODO: factor BQN -# TODO: test suite (dependent on BQN from mlochbaum) +# TODO: factor and version cbqn-bytecode-files +# TODO: test suite diff --git a/pkgs/development/interpreters/bqn/dzaima-bqn/default.nix b/pkgs/development/interpreters/bqn/dzaima-bqn/default.nix new file mode 100644 index 000000000000..6c4022ed0251 --- /dev/null +++ b/pkgs/development/interpreters/bqn/dzaima-bqn/default.nix @@ -0,0 +1,71 @@ +{ lib +, stdenv +, fetchFromGitHub +, jdk +, makeWrapper +, buildNativeImage ? true +}: + +stdenv.mkDerivation rec { + pname = "dbqn" + lib.optionalString buildNativeImage "-native"; + version = "0.0.0+unstable=2021-10-02"; + + src = fetchFromGitHub { + owner = "dzaima"; + repo = "BQN"; + rev = "d6bd66d26a89b8e9f956ec4f6b6bc5dcb5861a09"; + hash = "sha256-BLRep7OGHfDFowIAsBS19PTzgIhrdKMnO2JSjKuwGYo="; + }; + + buildInputs = lib.optional (!buildNativeImage) jdk; + + nativeBuildInputs = [ + makeWrapper + ] ++ lib.optional buildNativeImage jdk; + + dontConfigure = true; + + buildPhase = '' + runHook preBuild + + mkdir -p output + javac --release 8 -encoding UTF-8 -d ./output $(find src -name '*.java') + (cd output; jar cvfe ../BQN.jar BQN.Main *) + rm -fr output + '' + lib.optionalString buildNativeImage '' + native-image --report-unsupported-elements-at-runtime \ + -J-Dfile.encoding=UTF-8 -jar BQN.jar dbqn + '' + '' + runHook postBuild + ''; + + installPhase = '' + runHook preInstall + + mkdir -p $out/bin + + '' + (if buildNativeImage then '' + mv dbqn $out/bin + '' else '' + mkdir -p $out/share/${pname} + mv BQN.jar $out/share/${pname}/ + + makeWrapper "${lib.getBin jdk}/bin/java" "$out/bin/dbqn" \ + --add-flags "-jar $out/share/${pname}/BQN.jar" + '') + '' + ln -s $out/bin/dbqn $out/bin/bqn + + runHook postInstall + ''; + + meta = with lib; { + homepage = "https://github.com/dzaima/BQN"; + description = "A BQN implementation in Java" + lib.optionalString buildNativeImage ", compiled as a native image"; + license = licenses.mit; + maintainers = with maintainers; [ AndersonTorres sternenseemann ]; + inherit (jdk.meta) platforms; + priority = if buildNativeImage then 10 else 0; + }; +} +# TODO: Processing app +# TODO: minimalistic JDK diff --git a/pkgs/development/interpreters/bqn/mlochbaum-bqn/001-libbqn-path.patch b/pkgs/development/interpreters/bqn/mlochbaum-bqn/001-libbqn-path.patch new file mode 100644 index 000000000000..b23c3de44af6 --- /dev/null +++ b/pkgs/development/interpreters/bqn/mlochbaum-bqn/001-libbqn-path.patch @@ -0,0 +1,12 @@ +diff -Naur source-old/bqn.js source-new/bqn.js +--- source-old/bqn.js 1969-12-31 21:00:01.000000000 -0300 ++++ source-new/bqn.js 2021-10-03 01:28:00.268998916 -0300 +@@ -4,7 +4,7 @@ + let path = require('path'); + let fs = require('fs'); + +-let bqn = require("./docs/bqn.js"); ++let bqn = require("@libbqn@"); + module.exports = bqn; + let {fmt,fmtErr,sysvals,sysargs,makebqn,makerepl}=bqn; + let {has,list,str,unstr,dynsys,req1str,makens}=bqn.util; diff --git a/pkgs/development/interpreters/bqn/mlochbaum-bqn/default.nix b/pkgs/development/interpreters/bqn/mlochbaum-bqn/default.nix new file mode 100644 index 000000000000..8a280ad921b2 --- /dev/null +++ b/pkgs/development/interpreters/bqn/mlochbaum-bqn/default.nix @@ -0,0 +1,64 @@ +{ lib +, stdenvNoCC +, fetchFromGitHub +, makeWrapper +, nodejs +}: + +stdenvNoCC.mkDerivation rec { + pname = "bqn"; + version = "0.0.0+unstable=2021-10-01"; + + src = fetchFromGitHub { + owner = "mlochbaum"; + repo = "BQN"; + rev = "b3d68f730d48ccb5e3b3255f9010c95bf9f86e22"; + hash = "sha256-Tkgwz7+d25svmjRsXFUQq0S/73QJU+BKSNeGqpUcBTQ="; + }; + + nativeBuildInputs = [ makeWrapper ]; + + buildInputs = [ nodejs ]; + + patches = [ + # Creates a @libbqn@ substitution variable + ./001-libbqn-path.patch + ]; + + dontConfigure = true; + + dontBuild = true; + + installPhase = '' + runHook preInstall + + mkdir -p $out/bin $out/share/${pname} + cp bqn.js $out/share/${pname}/bqn.js + cp docs/bqn.js $out/share/${pname}/libbqn.js + + makeWrapper "${lib.getBin nodejs}/bin/node" "$out/bin/mbqn" \ + --add-flags "$out/share/${pname}/bqn.js" + + ln -s $out/bin/mbqn $out/bin/bqn + + runHook postInstall + ''; + + fixupPhase = '' + runHook preFixup + + substituteInPlace $out/share/${pname}/bqn.js \ + --subst-var-by "libbqn" "$out/share/${pname}/libbqn.js" + + runHook postFixup + ''; + + meta = with lib; { + homepage = "https://github.com/mlochbaum/BQN/"; + description = "The original BQN implementation in Javascript"; + license = licenses.isc; + maintainers = with maintainers; [ AndersonTorres ]; + platforms = platforms.all; + }; +} +# TODO: install docs and other stuff diff --git a/pkgs/development/python-modules/nvchecker/default.nix b/pkgs/development/python-modules/nvchecker/default.nix index 62942108ff4e..f8b434a7a129 100644 --- a/pkgs/development/python-modules/nvchecker/default.nix +++ b/pkgs/development/python-modules/nvchecker/default.nix @@ -20,14 +20,14 @@ buildPythonPackage rec { pname = "nvchecker"; - version = "2.4"; + version = "2.5"; # Tests not included in PyPI tarball src = fetchFromGitHub { owner = "lilydjwg"; repo = pname; rev = "v${version}"; - sha256 = "0ys4shp7gz6aaxrbflwcz7yjbvdv2v8pgj047p4rnp8ascpxg044"; + sha256 = "0jzmpra87dlj88d20ihnva9fj81wqbbd9qbzsjwwvzdx062136mg"; }; nativeBuildInputs = [ installShellFiles docutils ]; diff --git a/pkgs/os-specific/linux/rewritefs/default.nix b/pkgs/os-specific/linux/rewritefs/default.nix index 1525fa8f0044..e78d5f2d164c 100644 --- a/pkgs/os-specific/linux/rewritefs/default.nix +++ b/pkgs/os-specific/linux/rewritefs/default.nix @@ -2,7 +2,7 @@ stdenv.mkDerivation { pname = "rewritefs"; - version = "2021-10-03"; + version = "unstable-2021-10-03"; src = fetchFromGitHub { owner = "sloonz"; diff --git a/pkgs/tools/graphics/wgpu/default.nix b/pkgs/tools/graphics/wgpu/default.nix new file mode 100644 index 000000000000..31933000bf96 --- /dev/null +++ b/pkgs/tools/graphics/wgpu/default.nix @@ -0,0 +1,36 @@ +{ lib, rustPlatform, fetchFromGitHub, pkg-config, makeWrapper, vulkan-loader }: + +rustPlatform.buildRustPackage rec { + pname = "wgpu"; + version = "0.10.0"; + + src = fetchFromGitHub { + owner = "gfx-rs"; + repo = pname; + rev = "9da5c1d3a026c275feb57606b8c8d61f82b43386"; + sha256 = "sha256-DcIMP06tlMxI16jqpKqei32FY8h7z41Nvygap2MQC8A="; + }; + + cargoSha256 = "sha256-3gtIx337IP5t4nYGysOaU7SZRJrvVjYXN7mAqGbVlo8="; + + nativeBuildInputs = [ + pkg-config + makeWrapper + ]; + + # Tests fail, as the Nix sandbox doesn't provide an appropriate adapter (e.g. Vulkan). + doCheck = false; + + postInstall = '' + wrapProgram $out/bin/wgpu-info \ + --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ vulkan-loader ]} + ''; + + meta = with lib; { + description = "Safe and portable GPU abstraction in Rust, implementing WebGPU API."; + homepage = "https://wgpu.rs/"; + license = with licenses; [ asl20 /* or */ mit ]; + maintainers = with maintainers; [ erictapen ]; + mainProgram = "wgpu-info"; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 326ab580d3a6..f9f33384bf7b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -10492,6 +10492,8 @@ with pkgs; }); }; + wgpu = callPackage ../tools/graphics/wgpu { }; + wg-bond = callPackage ../applications/networking/wg-bond { }; which = callPackage ../tools/system/which { }; @@ -12851,16 +12853,50 @@ with pkgs; babashka = callPackage ../development/interpreters/clojure/babashka.nix { }; # BQN interpreters and compilers - cbqn = cbqn-phase2; - # And the classic bootstrapping process - cbqn-phase0 = callPackage ../development/interpreters/bqn/cbqn { - bqn-path = null; + + mbqn = callPackage ../development/interpreters/bqn/mlochbaum-bqn { }; + + cbqn = cbqn-bootstrap.phase2; + cbqn-standalone = cbqn-bootstrap.phase0; + + # Below, the classic self-bootstrapping process + cbqn-bootstrap = lib.dontRecurseIntoAttrs { + # use clang here since it emits less speculative warnings; + # however, avoid its building in cross compilations + stdenv = + if stdenv.hostPlatform == stdenv.buildPlatform + then clangStdenv + else stdenv; + mbqn-source = buildPackages.mbqn.src; + + phase0 = callPackage ../development/interpreters/bqn/cbqn { + inherit (cbqn-bootstrap) stdenv; + genBytecode = false; + bqn-path = null; + mbqn-source = null; + }; + + phase1 = callPackage ../development/interpreters/bqn/cbqn { + inherit (cbqn-bootstrap) stdenv mbqn-source; + genBytecode = true; + bqn-path = "${buildPackages.cbqn-bootstrap.phase0}/bin/cbqn"; + }; + + phase2 = callPackage ../development/interpreters/bqn/cbqn { + inherit (cbqn-bootstrap) stdenv mbqn-source; + genBytecode = true; + bqn-path = "${buildPackages.cbqn-bootstrap.phase1}/bin/cbqn"; + }; }; - cbqn-phase1 = callPackage ../development/interpreters/bqn/cbqn { - bqn-path = "${cbqn-phase0}/bin/bqn"; + + dbqn = callPackage ../development/interpreters/bqn/dzaima-bqn { + buildNativeImage = false; + stdenv = stdenvNoCC; + jdk = jre; }; - cbqn-phase2 = callPackage ../development/interpreters/bqn/cbqn { - bqn-path = "${cbqn-phase1}/bin/bqn"; + dbqn-native = callPackage ../development/interpreters/bqn/dzaima-bqn { + buildNativeImage = true; + jdk = graalvm11-ce; }; chibi = callPackage ../development/interpreters/chibi { }; @@ -24640,6 +24676,10 @@ with pkgs; flameshot = libsForQt5.callPackage ../tools/misc/flameshot { }; + flex-ncat = callPackage ../applications/radio/flex-ncat { }; + + flex-ndax = callPackage ../applications/radio/flex-ndax { }; + fluxbox = callPackage ../applications/window-managers/fluxbox { }; fme = callPackage ../applications/misc/fme { @@ -24817,6 +24857,8 @@ with pkgs; goffice = callPackage ../development/libraries/goffice { }; + got = callPackage ../applications/version-management/got { }; + gtk-pipe-viewer = perlPackages.callPackage ../applications/video/pipe-viewer { withGtk3 = true; }; hydrus = python3Packages.callPackage ../applications/graphics/hydrus { @@ -32122,6 +32164,8 @@ with pkgs; rargs = callPackage ../tools/misc/rargs { }; + rancher = callPackage ../applications/networking/cluster/rancher { }; + rauc = callPackage ../tools/misc/rauc { }; redprl = callPackage ../applications/science/logic/redprl { };