From a9a112e57fdd455fa6909af5bfdc3e9073514874 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Baylac-Jacqu=C3=A9?= Date: Fri, 23 Apr 2021 22:45:02 +0200 Subject: [PATCH 01/28] nsjail: fix bison link error The nsjail build has been broken since the 3.7.5 bison bump: /nix/store/(...)/bin/ld: kafel/libkafel.a(libkafel.o): in function `kafel_yyerror': arm_syscalls.c:(.text+0x6833): undefined reference to `YYUSE' The issue is coming from kafel and has been fixed upstream. More infos at: https://github.com/google/kafel/pull/28. Kafel being distributed through a git submodule in the nsjail repo, we can't directly fetchpatch the fix from Github. We had to manually modify the said patch to add a /kafel prefix. We'll need to remove this patch for the next nsjail version bump. --- .../nsjail/001-fix-bison-link-error.patch | 30 +++++++++++++++++++ pkgs/tools/security/nsjail/default.nix | 7 ++++- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 pkgs/tools/security/nsjail/001-fix-bison-link-error.patch diff --git a/pkgs/tools/security/nsjail/001-fix-bison-link-error.patch b/pkgs/tools/security/nsjail/001-fix-bison-link-error.patch new file mode 100644 index 00000000000..427cea5b02b --- /dev/null +++ b/pkgs/tools/security/nsjail/001-fix-bison-link-error.patch @@ -0,0 +1,30 @@ +From 8e309a0af0851ab54ca7c6d51b6f3d19ee42c8ee Mon Sep 17 00:00:00 2001 +From: Evangelos Foutras +Date: Wed, 17 Mar 2021 16:36:40 +0200 +Subject: [PATCH] Replace YYUSE call with void cast in src/parser.y + +The YYUSE macro was renamed to YY_USE in bison 3.7.5; we might as well +avoid using it altogether and cast the unused variable to void instead. + +Fixes the following linker error: + +/usr/bin/ld: kafel/libkafel.a(libkafel.o): in function `kafel_yyerror': +arm_syscalls.c:(.text+0x6984): undefined reference to `YYUSE' +--- + src/parser.y | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/parser.y b/src/parser.y +index e0f109c..0e01373 100644 +--- a/kafel/src/parser.y ++++ b/kafel/src/parser.y +@@ -420,8 +420,8 @@ const_def + + void yyerror(YYLTYPE * loc, struct kafel_ctxt* ctxt, yyscan_t scanner, + const char *msg) { ++ (void)scanner; /* suppress unused-parameter warning */ + if (!ctxt->lexical_error) { +- YYUSE(scanner); + if (loc->filename != NULL) { + append_error(ctxt, "%s:%d:%d: %s", loc->filename, loc->first_line, loc->first_column, msg); + } else { diff --git a/pkgs/tools/security/nsjail/default.nix b/pkgs/tools/security/nsjail/default.nix index d48564ce95b..568113368a0 100644 --- a/pkgs/tools/security/nsjail/default.nix +++ b/pkgs/tools/security/nsjail/default.nix @@ -4,7 +4,7 @@ stdenv.mkDerivation rec { pname = "nsjail"; - version = "3.0"; + version = "3.0"; # Bumping? Remove the bison patch. src = fetchFromGitHub { owner = "google"; @@ -18,6 +18,11 @@ stdenv.mkDerivation rec { buildInputs = [ libnl protobuf protobufc ]; enableParallelBuilding = true; + patches = [ + # To remove after bumping 3.0 + ./001-fix-bison-link-error.patch + ]; + preBuild = '' makeFlagsArray+=(USER_DEFINES='-DNEWUIDMAP_PATH=${shadow}/bin/newuidmap -DNEWGIDMAP_PATH=${shadow}/bin/newgidmap') ''; From 1e67ddbf6011bedfe980b6899202e5800475b57b Mon Sep 17 00:00:00 2001 From: Matt McHenry Date: Fri, 9 Apr 2021 11:32:42 -0400 Subject: [PATCH 02/28] eclipses: 2020-12 -> 2021-03 * remove the jdt plugin, as it's not longer packaged separately on the eclipse download site :-( https://www.eclipse.org/forums/index.php/t/1107570/ * add eclipse-jee as a second option for those who need jdt * remove eclipses.rust this build was present at: https://www.eclipse.org/downloads/packages/release/2020-12/r https://www.eclipse.org/downloads/packages/release/2021-03/m2 but is not present at: https://www.eclipse.org/downloads/packages/release/2021-03/m3 https://www.eclipse.org/downloads/packages/release/2021-03/rc1 https://www.eclipse.org/downloads/packages/release/2021-03/r https://projects.eclipse.org/projects/tools.corrosion seems to point users to install as a plugin rather than a top-level eclipse package. --- pkgs/applications/editors/eclipse/default.nix | 48 +++++++++---------- pkgs/applications/editors/eclipse/plugins.nix | 24 ++-------- 2 files changed, 27 insertions(+), 45 deletions(-) diff --git a/pkgs/applications/editors/eclipse/default.nix b/pkgs/applications/editors/eclipse/default.nix index 2c067250309..000726dd81a 100644 --- a/pkgs/applications/editors/eclipse/default.nix +++ b/pkgs/applications/editors/eclipse/default.nix @@ -12,14 +12,14 @@ assert stdenv ? glibc; # find the downloads needed for new versions # # to test: -# $ for e in cpp modeling platform sdk java committers rcp rust; do nix build -f default.nix pkgs.eclipses.eclipse-${e} -o eclipse-${e}; done +# $ for e in cpp modeling platform sdk java jee committers rcp; do nix build -f default.nix pkgs.eclipses.eclipse-${e} -o eclipse-${e}; done let platform_major = "4"; - platform_minor = "18"; - year = "2020"; - month = "12"; - timestamp = "${year}${month}021800"; + platform_minor = "19"; + year = "2021"; + month = "03"; + timestamp = "${year}${month}031800"; gtk = gtk3; in rec { @@ -37,7 +37,7 @@ in rec { src = fetchurl { url = "https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/technology/epp/downloads/release/${year}-${month}/R/eclipse-cpp-${year}-${month}-R-linux-gtk-x86_64.tar.gz"; - sha512 = "MR6ddNmBKyXCyVGlGPfq6K2zJRywy4I5QDXji3rh81eJQ6zkEguo+VvD75i/szg/+FbCVA09vDVV06JgL4SHwQ=="; + sha512 = "3j0lmll0glcr9p0hf49jiaq9xr8hadsy0y58wbbkdpldj3rclxr056dkswmiw2bkypfiwrjygbli5qxyp6mz380562hc2kjwijqq476"; }; }; @@ -49,7 +49,7 @@ in rec { src = fetchurl { url = "https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/technology/epp/downloads/release/${year}-${month}/R/eclipse-modeling-${year}-${month}-R-linux-gtk-x86_64.tar.gz"; - sha512 = "hSi3IL+fWhlUfEJYv4LFO7WNbZpiofAgNGZbEOIBS0VpeHfJ5Y6UKMKMLfQlG3hlkAL5jg/cEJKb/ad4DxHbjQ=="; + sha512 = "0iqz9a3ixcbmaci6lnspdnzwd2h1fcygi54hmsl89pq3d1k5scyhcl123ixi24csi782w847bn0lq00n0zwras9akmnhsflra4mw5pz"; }; }; @@ -61,7 +61,7 @@ in rec { src = fetchurl { url = "https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/eclipse/downloads/drops${platform_major}/R-${platform_major}.${platform_minor}-${timestamp}/eclipse-platform-${platform_major}.${platform_minor}-linux-gtk-x86_64.tar.gz"; - sha512 = "cPRa7ICogpcuwzOlzSSCEcWpwpUhQuIv6lGBKuAu9mOwj7Nz0TPaWVWNqN1541uVRXVTzcWX+mwc2UBPzWUPxg=="; + sha512 = "03v1ly7j9d9qnl3d9rl5a9kp483dz8i8v3cfnh55ksm9fk8iy2fzg6wq178ggnx2z5x9k88a4wk6n647yilh2hgc2l7926imkh2j1ly"; }; }; @@ -86,7 +86,7 @@ in rec { src = fetchurl { url = "https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/eclipse/downloads/drops${platform_major}/R-${platform_major}.${platform_minor}-${timestamp}/eclipse-SDK-${platform_major}.${platform_minor}-linux-gtk-x86_64.tar.gz"; - sha512 = "iN6z5iSJ2bhE1IH3uJj7aiaF/nSIgIAqadvaTBpE4gkgLAXgtfraFAzgcw0zJr5m2u5mULfW45hLkmIXselniQ=="; + sha512 = "37m91my121pch12bwpwk5svfqkm7vl07wjx4fkhpy947v5kjf36hm6x0i45swdg7f0hk72y2qz5ka15ki5jv890qy5psj6z7ax9sys7"; }; }; @@ -98,7 +98,19 @@ in rec { src = fetchurl { url = "https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/technology/epp/downloads/release/${year}-${month}/R/eclipse-java-${year}-${month}-R-linux-gtk-x86_64.tar.gz"; - sha512 = "HVqsWUVNNRdcaziGdNI96R9F2VMUE4nYK1VX1G3pK+srFDlkJ7+rj2sZjtWL7WcJR1XSbT03nJJzPyp01RsCvQ=="; + sha512 = "3qrnj6krhrqc9rfwlim3v7kshwfhsi050pszw6xdfbj56mzr9whr7l76isbpxd5j0zipgfw3qrzrx379pdp899d35fv284ilvllzl4k"; + }; + }; + + ### Eclipse Java EE + + eclipse-jee = buildEclipse { + name = "eclipse-jee-${platform_major}.${platform_minor}"; + description = "Eclipse IDE for Enterprise Java and Web Developers"; + src = + fetchurl { + url = "https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/technology/epp/downloads/release/${year}-${month}/R/eclipse-jee-${year}-${month}-R-linux-gtk-x86_64.tar.gz"; + sha512 = "04k4x9imabxddqlrgajn33ak8i58wcap40ll09xz23d1sxn9a8prh01s06ymgwg6ldg939srphvbz4112p8p0b1hl7m25a02qll91zv"; }; }; @@ -110,7 +122,7 @@ in rec { src = fetchurl { url = "https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/technology/epp/downloads/release/${year}-${month}/R/eclipse-committers-${year}-${month}-R-linux-gtk-x86_64.tar.gz"; - sha512 = "UtI4piLNRM3TsM9PzbGgsPqTkiurJ+7Q7jVra45an4YJHtfWcGTxxwUNnRzay6cHT49AjrWtVf1bovWSDXMiQA=="; + sha512 = "2yksl3w7yr1a3h4zdpa9zf394r5c185zqxhigdv858ldg46kmr9h0l2c7shbgb16kkybcnrk4x44dhjvh60x8xw6ma05klp4lp9v5va"; }; }; @@ -122,19 +134,7 @@ in rec { src = fetchurl { url = "https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/technology/epp/downloads/release/${year}-${month}/R/eclipse-rcp-${year}-${month}-R-linux-gtk-x86_64.tar.gz"; - sha512 = "9DqNjSx1Ypdzpt1jIOJ9KFx8y+cG55K6bqkWTqnGjjDr4h4mWSzvGjHGUtFrKl92WRzQZKjNPxzVreDMcUkc/g=="; - }; - }; - - ### Eclipse IDE for Rust Developers - - eclipse-rust = buildEclipse { - name = "eclipse-rust-${platform_major}.${platform_minor}"; - description = "Eclipse IDE for Rust Developers"; - src = - fetchurl { - url = "https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/technology/epp/downloads/release/${year}-${month}/R/eclipse-rust-${year}-${month}-R-linux-gtk-x86_64.tar.gz"; - sha512 = "QbaG1knCMFnVQkPeApcIamJMXPyL8zUQa0ZsTJOuTgU/fD1RiHN7/WS6ax5azzIJhpjEtj2LMU4XV+MwkzResw=="; + sha512 = "3fhrhwbyqcys56c93s1vl9rbvn269nn5y3cb9f3n1qwgw6i97mim2zy98jl3r8cksf97jwsmqmsqclsgz9v799wcckv81dj1l628382"; }; }; diff --git a/pkgs/applications/editors/eclipse/plugins.nix b/pkgs/applications/editors/eclipse/plugins.nix index dc86ebca214..5937311b5c9 100644 --- a/pkgs/applications/editors/eclipse/plugins.nix +++ b/pkgs/applications/editors/eclipse/plugins.nix @@ -248,12 +248,12 @@ rec { cdt = buildEclipseUpdateSite rec { name = "cdt-${version}"; # find current version at https://www.eclipse.org/cdt/downloads.php - version = "10.1.0"; + version = "10.2.0"; src = fetchzip { stripRoot = false; - url = "https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/tools/cdt/releases/10.1/${name}/${name}.zip"; - sha256 = "1hbswcar3a5cw20mwrj82w9pvpkvvj6jrvqqf1lincva0r5sl7h8"; + url = "https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/tools/cdt/releases/10.2/${name}/${name}.zip"; + sha256 = "1r30cbpbzw3dfcsn54p6sqip86dqhydhsppjgaz60b6z138vzx49"; }; meta = with lib; { @@ -474,24 +474,6 @@ rec { }; }; - jdt = buildEclipseUpdateSite rec { - name = "jdt-${version}"; - version = "4.18"; - - src = fetchzip { - stripRoot = false; - url = "https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/eclipse/downloads/drops4/R-${version}-202012021800/org.eclipse.jdt-${version}.zip"; - sha256 = "q0O6OE2u0bdz1+nOkzXDrrOOzoEbVaXnejx4lX7uZgk="; - }; - - meta = with lib; { - homepage = "https://www.eclipse.org/jdt/"; - description = "Eclipse Java development tools"; - license = licenses.epl10; - platforms = platforms.all; - }; - }; - jdt-codemining = buildEclipsePlugin rec { name = "jdt-codemining-${version}"; version = "1.0.0.201806221018"; From 05c13a03e2fb27186d8d1f2825807bf156512111 Mon Sep 17 00:00:00 2001 From: Samuel Dionne-Riel Date: Fri, 23 Apr 2021 04:15:14 -0400 Subject: [PATCH 03/28] make-disk-image: Get proper size for automatic size MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On some filesystems, `du` without `--apparent-size` will not give the actual size for a file. Using `--apparent-size` will give us the actual file size. Though, this is not actually correct still. 1000 × 1 bytes is not 1000 bytes. It is 1000 × ceil(filesize/blockSize)*blockSize. So instead of adding up the actual file sizes. We are adding up the block sizes. Note that this also changes the builder to work with *bytes*, rather than with any other units. Doing maths on bytes is less likely to go awry than doing it on other units. --- nixos/lib/make-disk-image.nix | 34 ++++++++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/nixos/lib/make-disk-image.nix b/nixos/lib/make-disk-image.nix index 023d0791a5c..164f2f0f0be 100644 --- a/nixos/lib/make-disk-image.nix +++ b/nixos/lib/make-disk-image.nix @@ -163,6 +163,8 @@ let format' = format; in let closureInfo = pkgs.closureInfo { rootPaths = [ config.system.build.toplevel channelSources ]; }; + blockSize = toString (4 * 1024); # ext4fs block size (not block device sector size) + prepareImage = '' export PATH=${binPath} @@ -175,6 +177,15 @@ let format' = format; in let echo $(( "$1" * 512 )) } + # Given lines of numbers, adds them together + sum_lines() { + local acc=0 + while read -r number; do + acc=$((acc+number)) + done + echo "$acc" + } + mkdir $out root="$PWD/root" @@ -235,12 +246,23 @@ let format' = format; in let ${if diskSize == "auto" then '' ${if partitionTableType == "efi" || partitionTableType == "hybrid" then '' - additionalSpace=$(( ($(numfmt --from=iec '${additionalSpace}') + $(numfmt --from=iec '${bootSize}')) / 1000 )) + additionalSpace=$(( ($(numfmt --from=iec '${additionalSpace}') + $(numfmt --from=iec '${bootSize}')) )) '' else '' - additionalSpace=$(( $(numfmt --from=iec '${additionalSpace}') / 1000 )) + additionalSpace=$(( $(numfmt --from=iec '${additionalSpace}') )) ''} - diskSize=$(( $(set -- $(du -d0 $root); echo "$1") + $additionalSpace )) - truncate -s "$diskSize"K $diskImage + + # Compute required space in filesystem blocks + requiredSpace=$(find . ! -type d -exec 'du' '--apparent-size' '--block-size' "${blockSize}" '{}' ';' | cut -f1 | sum_lines) + # Convert to bytes + requiredSpace=$(( requiredSpace * ${blockSize} )) + + diskSize=$(( requiredSpace + additionalSpace )) + truncate -s "$diskSize" $diskImage + + printf "Automatic disk size...\n" + printf " Space needed: %d bytes\n" $requiredSpace + printf " Additional space: %d bytes\n" $additionalSpace + printf " Disk image size: %d bytes\n" $diskSize '' else '' truncate -s ${toString diskSize}M $diskImage ''} @@ -251,9 +273,9 @@ let format' = format; in let # Get start & length of the root partition in sectors to $START and $SECTORS. eval $(partx $diskImage -o START,SECTORS --nr ${rootPartition} --pairs) - mkfs.${fsType} -F -L ${label} $diskImage -E offset=$(sectorsToBytes $START) $(sectorsToKilobytes $SECTORS)K + mkfs.${fsType} -b ${blockSize} -F -L ${label} $diskImage -E offset=$(sectorsToBytes $START) $(sectorsToKilobytes $SECTORS)K '' else '' - mkfs.${fsType} -F -L ${label} $diskImage + mkfs.${fsType} -b ${blockSize} -F -L ${label} $diskImage ''} echo "copying staging root to image..." From 9b18a78c739a2a43c3ed386a4a9c52e4f7360650 Mon Sep 17 00:00:00 2001 From: Samuel Dionne-Riel Date: Fri, 23 Apr 2021 23:18:08 -0400 Subject: [PATCH 04/28] make-disk-image: Account for the ext4 reserved space Reserved space includes: - inodes space in use (2 blocks per) - about 5.2% of the space The 5.2% reserved space was computed empirically when working on a previous EXT4 image builder. It seems to stabilize around 5% even for much larger filesystems. --- nixos/lib/make-disk-image.nix | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/nixos/lib/make-disk-image.nix b/nixos/lib/make-disk-image.nix index 164f2f0f0be..f1c942181f0 100644 --- a/nixos/lib/make-disk-image.nix +++ b/nixos/lib/make-disk-image.nix @@ -186,6 +186,13 @@ let format' = format; in let echo "$acc" } + # Approximative percentage of reserved space in an ext4 fs over 512MiB. + # 0.05208587646484375 + # × 1000, integer part: 52 + compute_fudge() { + echo $(( $1 * 52 / 1000 )) + } + mkdir $out root="$PWD/root" @@ -252,15 +259,22 @@ let format' = format; in let ''} # Compute required space in filesystem blocks - requiredSpace=$(find . ! -type d -exec 'du' '--apparent-size' '--block-size' "${blockSize}" '{}' ';' | cut -f1 | sum_lines) - # Convert to bytes - requiredSpace=$(( requiredSpace * ${blockSize} )) + diskUsage=$(find . ! -type d -exec 'du' '--apparent-size' '--block-size' "${blockSize}" '{}' ';' | cut -f1 | sum_lines) + # Each inode takes space! + numInodes=$(find . | wc -l) + # Convert to bytes, inodes take two blocks each! + diskUsage=$(( (diskUsage + 2 * numInodes) * ${blockSize} )) + # Then increase the required space to account for the reserved blocks. + fudge=$(compute_fudge $diskUsage) + requiredFilesystemSpace=$(( diskUsage + fudge )) - diskSize=$(( requiredSpace + additionalSpace )) + diskSize=$(( requiredFilesystemSpace + additionalSpace )) truncate -s "$diskSize" $diskImage printf "Automatic disk size...\n" - printf " Space needed: %d bytes\n" $requiredSpace + printf " Closure space use: %d bytes\n" $diskUsage + printf " fudge: %d bytes\n" $fudge + printf " Filesystem size needed: %d bytes\n" $requiredFilesystemSpace printf " Additional space: %d bytes\n" $additionalSpace printf " Disk image size: %d bytes\n" $diskSize '' else '' From ba666011a64aee55c78c9cb4b0e7c272479d9a2e Mon Sep 17 00:00:00 2001 From: Samuel Dionne-Riel Date: Fri, 23 Apr 2021 23:20:49 -0400 Subject: [PATCH 05/28] make-disk-image: Account for reserved disk space This is a bit of a thorny issue. See, the actual `diskSize` variable is for the *total* disk size, not for the filesystem! The automatic numbers are meant to compute the *filesystem* required space. So we have to add any other reserved space! We have different requirements for reserved space. E.g. there could be none (when it's actually a filesystem image). There could also be 1MiB for alignment for an MBR image, legacy+gpt needs 2MiB, then GPT with an ESP ("bootSize") needs to take the boot partition and GPT size into account too! Though luckily(?) for this latter situation we can cheat! As noted in the change, `bootSize` is NOT the boot partition size. It is actually the offset where the target filesystem starts. --- nixos/lib/make-disk-image.nix | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/nixos/lib/make-disk-image.nix b/nixos/lib/make-disk-image.nix index f1c942181f0..26a591646e2 100644 --- a/nixos/lib/make-disk-image.nix +++ b/nixos/lib/make-disk-image.nix @@ -15,6 +15,8 @@ , # size of the boot partition, is only used if partitionTableType is # either "efi" or "hybrid" + # This will be undersized slightly, as this is actually the offset of + # the end of the partition. Generally it will be 1MiB smaller. bootSize ? "256M" , # The files and directories to be placed in the target file system. @@ -253,10 +255,25 @@ let format' = format; in let ${if diskSize == "auto" then '' ${if partitionTableType == "efi" || partitionTableType == "hybrid" then '' - additionalSpace=$(( ($(numfmt --from=iec '${additionalSpace}') + $(numfmt --from=iec '${bootSize}')) )) + # Add the GPT at the end + gptSpace=$(( 512 * 34 * 1 )) + # Normally we'd need to account for alignment and things, if bootSize + # represented the actual size of the boot partition. But it instead + # represents the offset at which it ends. + # So we know bootSize is the reserved space in front of the partition. + reservedSpace=$(( gptSpace + $(numfmt --from=iec '${bootSize}') )) + '' else if partitionTableType == "legacy+gpt" then '' + # Add the GPT at the end + gptSpace=$(( 512 * 34 * 1 )) + # And include the bios_grub partition; the ext4 partition starts at 2MB exactly. + reservedSpace=$(( gptSpace + 2 * 1024*1024 )) + '' else if partitionTableType == "legacy" then '' + # Add the 1MiB aligned reserved space (includes MBR) + reservedSpace=$(( 1024*1024 )) '' else '' - additionalSpace=$(( $(numfmt --from=iec '${additionalSpace}') )) + reservedSpace=0 ''} + additionalSpace=$(( $(numfmt --from=iec '${additionalSpace}') + reservedSpace )) # Compute required space in filesystem blocks diskUsage=$(find . ! -type d -exec 'du' '--apparent-size' '--block-size' "${blockSize}" '{}' ';' | cut -f1 | sum_lines) From 5aa4273e4f5e0ea7d0abd61d57c1c2301e284f23 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sat, 19 Dec 2020 19:41:11 +0100 Subject: [PATCH 06/28] treewide: use auto diskSize for make-disk-image (cherry picked from commit f3aa040bcbf39935e7e9ac7a7296eac9da7623ec) --- nixos/maintainers/scripts/cloudstack/cloudstack-image.nix | 1 - nixos/maintainers/scripts/ec2/amazon-image.nix | 5 +++-- nixos/maintainers/scripts/openstack/openstack-image.nix | 2 +- nixos/modules/virtualisation/azure-image.nix | 5 +++-- nixos/modules/virtualisation/digital-ocean-image.nix | 5 +++-- nixos/modules/virtualisation/google-compute-image.nix | 5 +++-- nixos/modules/virtualisation/hyperv-image.nix | 5 +++-- nixos/modules/virtualisation/virtualbox-image.nix | 5 +++-- nixos/modules/virtualisation/vmware-image.nix | 5 +++-- 9 files changed, 22 insertions(+), 16 deletions(-) diff --git a/nixos/maintainers/scripts/cloudstack/cloudstack-image.nix b/nixos/maintainers/scripts/cloudstack/cloudstack-image.nix index 37b46db059c..005f75476e9 100644 --- a/nixos/maintainers/scripts/cloudstack/cloudstack-image.nix +++ b/nixos/maintainers/scripts/cloudstack/cloudstack-image.nix @@ -10,7 +10,6 @@ with lib; system.build.cloudstackImage = import ../../../lib/make-disk-image.nix { inherit lib config pkgs; - diskSize = 8192; format = "qcow2"; configFile = pkgs.writeText "configuration.nix" '' diff --git a/nixos/maintainers/scripts/ec2/amazon-image.nix b/nixos/maintainers/scripts/ec2/amazon-image.nix index 0ecf07669a1..653744986d1 100644 --- a/nixos/maintainers/scripts/ec2/amazon-image.nix +++ b/nixos/maintainers/scripts/ec2/amazon-image.nix @@ -40,8 +40,9 @@ in { }; sizeMB = mkOption { - type = types.int; - default = if config.ec2.hvm then 2048 else 8192; + type = with types; either (enum [ "auto" ]) int; + default = "auto"; + example = 8192; description = "The size in MB of the image"; }; diff --git a/nixos/maintainers/scripts/openstack/openstack-image.nix b/nixos/maintainers/scripts/openstack/openstack-image.nix index 4c464f43f61..3255e7f3d44 100644 --- a/nixos/maintainers/scripts/openstack/openstack-image.nix +++ b/nixos/maintainers/scripts/openstack/openstack-image.nix @@ -12,8 +12,8 @@ with lib; system.build.openstackImage = import ../../../lib/make-disk-image.nix { inherit lib config; + additionalSpace = "1024M"; pkgs = import ../../../.. { inherit (pkgs) system; }; # ensure we use the regular qemu-kvm package - diskSize = 8192; format = "qcow2"; configFile = pkgs.writeText "configuration.nix" '' diff --git a/nixos/modules/virtualisation/azure-image.nix b/nixos/modules/virtualisation/azure-image.nix index 60fed3222ef..03dd3c05130 100644 --- a/nixos/modules/virtualisation/azure-image.nix +++ b/nixos/modules/virtualisation/azure-image.nix @@ -9,8 +9,9 @@ in options = { virtualisation.azureImage.diskSize = mkOption { - type = with types; int; - default = 2048; + type = with types; either (enum [ "auto" ]) int; + default = "auto"; + example = 2048; description = '' Size of disk image. Unit is MB. ''; diff --git a/nixos/modules/virtualisation/digital-ocean-image.nix b/nixos/modules/virtualisation/digital-ocean-image.nix index b582e235d43..0ff2ee591f2 100644 --- a/nixos/modules/virtualisation/digital-ocean-image.nix +++ b/nixos/modules/virtualisation/digital-ocean-image.nix @@ -10,8 +10,9 @@ in options = { virtualisation.digitalOceanImage.diskSize = mkOption { - type = with types; int; - default = 4096; + type = with types; either (enum [ "auto" ]) int; + default = "auto"; + example = 4096; description = '' Size of disk image. Unit is MB. ''; diff --git a/nixos/modules/virtualisation/google-compute-image.nix b/nixos/modules/virtualisation/google-compute-image.nix index e2332df611a..79c3921669e 100644 --- a/nixos/modules/virtualisation/google-compute-image.nix +++ b/nixos/modules/virtualisation/google-compute-image.nix @@ -18,8 +18,9 @@ in options = { virtualisation.googleComputeImage.diskSize = mkOption { - type = with types; int; - default = 1536; + type = with types; either (enum [ "auto" ]) int; + default = "auto"; + example = 1536; description = '' Size of disk image. Unit is MB. ''; diff --git a/nixos/modules/virtualisation/hyperv-image.nix b/nixos/modules/virtualisation/hyperv-image.nix index fabc9113dfc..6845d675009 100644 --- a/nixos/modules/virtualisation/hyperv-image.nix +++ b/nixos/modules/virtualisation/hyperv-image.nix @@ -9,8 +9,9 @@ in { options = { hyperv = { baseImageSize = mkOption { - type = types.int; - default = 2048; + type = with types; either (enum [ "auto" ]) int; + default = "auto"; + example = 2048; description = '' The size of the hyper-v base image in MiB. ''; diff --git a/nixos/modules/virtualisation/virtualbox-image.nix b/nixos/modules/virtualisation/virtualbox-image.nix index fa580e8b42d..071edda8269 100644 --- a/nixos/modules/virtualisation/virtualbox-image.nix +++ b/nixos/modules/virtualisation/virtualbox-image.nix @@ -11,8 +11,9 @@ in { options = { virtualbox = { baseImageSize = mkOption { - type = types.int; - default = 50 * 1024; + type = with types; either (enum [ "auto" ]) int; + default = "auto"; + example = 50 * 1024; description = '' The size of the VirtualBox base image in MiB. ''; diff --git a/nixos/modules/virtualisation/vmware-image.nix b/nixos/modules/virtualisation/vmware-image.nix index 9da9e145f7a..f6cd12e2bb7 100644 --- a/nixos/modules/virtualisation/vmware-image.nix +++ b/nixos/modules/virtualisation/vmware-image.nix @@ -18,8 +18,9 @@ in { options = { vmware = { baseImageSize = mkOption { - type = types.int; - default = 2048; + type = with types; either (enum [ "auto" ]) int; + default = "auto"; + example = 2048; description = '' The size of the VMWare base image in MiB. ''; From 6c04559dae863c4d88078841476a2b629688607f Mon Sep 17 00:00:00 2001 From: Atemu Date: Sun, 25 Apr 2021 12:19:02 +0200 Subject: [PATCH 07/28] zen-kernels: 5.11.15 -> 5.11.16 --- pkgs/os-specific/linux/kernel/linux-lqx.nix | 4 ++-- pkgs/os-specific/linux/kernel/linux-zen.nix | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/linux-lqx.nix b/pkgs/os-specific/linux/kernel/linux-lqx.nix index 8662fbbd18b..8d0333e8fd6 100644 --- a/pkgs/os-specific/linux/kernel/linux-lqx.nix +++ b/pkgs/os-specific/linux/kernel/linux-lqx.nix @@ -1,7 +1,7 @@ { lib, fetchFromGitHub, buildLinux, linux_zen, ... } @ args: let - version = "5.11.15"; + version = "5.11.16"; suffix = "lqx1"; in @@ -14,7 +14,7 @@ buildLinux (args // { owner = "zen-kernel"; repo = "zen-kernel"; rev = "v${version}-${suffix}"; - sha256 = "1dwibknj4q8cd3mim679mrb4j8yi7p4q9qjcb4rwvw0yzgxmz3lv"; + sha256 = "1j25r45arikjwyhbr72r1935pr7a8g2j6vshggywdiixvizvrx9b"; }; extraMeta = { diff --git a/pkgs/os-specific/linux/kernel/linux-zen.nix b/pkgs/os-specific/linux/kernel/linux-zen.nix index 92aaa957458..b28400819d5 100644 --- a/pkgs/os-specific/linux/kernel/linux-zen.nix +++ b/pkgs/os-specific/linux/kernel/linux-zen.nix @@ -1,7 +1,7 @@ { lib, fetchFromGitHub, buildLinux, ... } @ args: let - version = "5.11.15"; + version = "5.11.16"; suffix = "zen1"; in @@ -14,7 +14,7 @@ buildLinux (args // { owner = "zen-kernel"; repo = "zen-kernel"; rev = "v${version}-${suffix}"; - sha256 = "0n9wm0lpwkqd79112k03lxp4hc898nvs2jjw3hxzggn5wk4i2dz9"; + sha256 = "0jyicnpqccn194jrm1mc4zq0cil7ls9l57ws3nv783vlk7b0k3gv"; }; extraMeta = { From 303e476a6e28b371d47e0884baea59bff2f26d45 Mon Sep 17 00:00:00 2001 From: Maxim Zhukov Date: Sun, 25 Apr 2021 13:53:37 +0300 Subject: [PATCH 08/28] simple-http-server: init at 0.6.1 Co-authored-by: Fabian Affolter Signed-off-by: Maxim Zhukov --- pkgs/servers/simple-http-server/default.nix | 29 +++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 31 insertions(+) create mode 100644 pkgs/servers/simple-http-server/default.nix diff --git a/pkgs/servers/simple-http-server/default.nix b/pkgs/servers/simple-http-server/default.nix new file mode 100644 index 00000000000..d93b4664019 --- /dev/null +++ b/pkgs/servers/simple-http-server/default.nix @@ -0,0 +1,29 @@ +{ lib, rustPlatform, fetchFromGitHub, pkg-config, openssl }: + +rustPlatform.buildRustPackage rec { + pname = "simple-http-server"; + version = "0.6.1"; + + src = fetchFromGitHub { + owner = "TheWaWaR"; + repo = pname; + rev = "v${version}"; + sha256 = "01a129i1ph3m8k6zkdcqnnkqbhlqpk7qvvdsz2i2kas54csbgsww"; + }; + + cargoSha256 = "050avk6wff8v1dlsfvxwvldmmgfakdxmhglv2bhvc2f3q8cf1d5d"; + + nativeBuildInputs = [ pkg-config ]; + + buildInputs = [ openssl ]; + + # Currently no tests are implemented, so we avoid building the package twice + doCheck = false; + + meta = with lib; { + description = "Simple HTTP server in Rust"; + homepage = "https://github.com/TheWaWaR/simple-http-server"; + license = licenses.mit; + maintainers = with maintainers; [ mephistophiles ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5e915c24aeb..88e41e28454 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -31003,6 +31003,8 @@ in simplehttp2server = callPackage ../servers/simplehttp2server { }; + simple-http-server = callPackage ../servers/simple-http-server { }; + diceware = with python3Packages; toPythonApplication diceware; xml2rfc = with python3Packages; toPythonApplication xml2rfc; From 42cca18c8c2eb4c29f448e755b1b7d810ed84c4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sun, 25 Apr 2021 16:01:46 +0200 Subject: [PATCH 09/28] streamlink: 2.0.0 -> 2.1.1 --- .../applications/video/streamlink/default.nix | 23 +++++++++++-------- pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/pkgs/applications/video/streamlink/default.nix b/pkgs/applications/video/streamlink/default.nix index 97607f939fd..94bd0877a7d 100644 --- a/pkgs/applications/video/streamlink/default.nix +++ b/pkgs/applications/video/streamlink/default.nix @@ -1,30 +1,29 @@ { lib -, pythonPackages +, python3 , fetchFromGitHub , rtmpdump -, ffmpeg_3 +, ffmpeg }: -pythonPackages.buildPythonApplication rec { +python3.pkgs.buildPythonApplication rec { pname = "streamlink"; - version = "2.0.0"; - disabled = pythonPackages.pythonOlder "3.5.0"; + version = "2.1.1"; src = fetchFromGitHub { owner = "streamlink"; repo = "streamlink"; rev = version; - sha256 = "+W9Nu5Ze08r7IlUZOkkVOz582E1Bbj0a3qIQHwxSmj8="; + sha256 = "14vqh4pck3q766qln7c57n9bz8zrlgfqrpkdn8x0ac9zhlhfn1zm"; }; - checkInputs = with pythonPackages; [ - pytest + checkInputs = with python3.pkgs; [ + pytestCheckHook mock requests-mock freezegun ]; - propagatedBuildInputs = (with pythonPackages; [ + propagatedBuildInputs = (with python3.pkgs; [ pycryptodome requests iso-639 @@ -33,7 +32,11 @@ pythonPackages.buildPythonApplication rec { isodate ]) ++ [ rtmpdump - ffmpeg_3 + ffmpeg + ]; + + disabledTests = [ + "test_plugin_not_in_removed_list" ]; meta = with lib; { diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 1d168499a14..ffc23374a74 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -17621,7 +17621,7 @@ in stlport = callPackage ../development/libraries/stlport { }; - streamlink = callPackage ../applications/video/streamlink { pythonPackages = python3Packages; }; + streamlink = callPackage ../applications/video/streamlink { }; streamlink-twitch-gui-bin = callPackage ../applications/video/streamlink-twitch-gui/bin.nix {}; sub-batch = callPackage ../applications/video/sub-batch { }; From 9a29b3479e26bfd8bc892a390288da7b401b2c99 Mon Sep 17 00:00:00 2001 From: figsoda Date: Sun, 25 Apr 2021 15:16:52 -0400 Subject: [PATCH 10/28] qogir-theme: 2021-02-09 -> 2021-04-20 --- pkgs/data/themes/qogir/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/data/themes/qogir/default.nix b/pkgs/data/themes/qogir/default.nix index 3f87473a4a1..a1011fa0a15 100644 --- a/pkgs/data/themes/qogir/default.nix +++ b/pkgs/data/themes/qogir/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "qogir-theme"; - version = "2021-02-09"; + version = "2021-04-20"; src = fetchFromGitHub { owner = "vinceliuice"; repo = pname; rev = version; - sha256 = "1pilq939bqzxysw4ixd279c49bp7l74bykpprrhgc5f2klpjg1zn"; + sha256 = "17ajrg5safnb6b1jbwvnysc4rvl6gkpnqdf89bammlrpkj6fr3ip"; }; buildInputs = [ gdk-pixbuf librsvg ]; From 7b8b3fab6dce5357c14fc435b436514fc985f0f7 Mon Sep 17 00:00:00 2001 From: Samuel Dionne-Riel Date: Sun, 25 Apr 2021 15:24:45 -0400 Subject: [PATCH 11/28] make-disk-image: Round image size to the next mebibyte This ensures the following gptfdisk warning won't happen: ``` Warning: File size is not a multiple of 512 bytes! Misbehavior is likely! ``` Additionally, helps towards aligning the partition to be more optimal for the underlying storage. It is actually impossible to align for the actual underlying storage optimally because we don't know what the block device will be! But aligning on 1MiB should help. --- nixos/lib/make-disk-image.nix | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/nixos/lib/make-disk-image.nix b/nixos/lib/make-disk-image.nix index 26a591646e2..d87b3ef8da0 100644 --- a/nixos/lib/make-disk-image.nix +++ b/nixos/lib/make-disk-image.nix @@ -188,6 +188,8 @@ let format' = format; in let echo "$acc" } + mebibyte=$(( 1024 * 1024 )) + # Approximative percentage of reserved space in an ext4 fs over 512MiB. # 0.05208587646484375 # × 1000, integer part: 52 @@ -266,10 +268,10 @@ let format' = format; in let # Add the GPT at the end gptSpace=$(( 512 * 34 * 1 )) # And include the bios_grub partition; the ext4 partition starts at 2MB exactly. - reservedSpace=$(( gptSpace + 2 * 1024*1024 )) + reservedSpace=$(( gptSpace + 2 * mebibyte )) '' else if partitionTableType == "legacy" then '' # Add the 1MiB aligned reserved space (includes MBR) - reservedSpace=$(( 1024*1024 )) + reservedSpace=$(( mebibyte )) '' else '' reservedSpace=0 ''} @@ -286,6 +288,14 @@ let format' = format; in let requiredFilesystemSpace=$(( diskUsage + fudge )) diskSize=$(( requiredFilesystemSpace + additionalSpace )) + + # Round up to the nearest mebibyte. + # This ensures whole 512 bytes sector sizes in the disk image + # and helps towards aligning partitions optimally. + if (( diskSize % mebibyte )); then + diskSize=$(( ( diskSize / mebibyte + 1) * mebibyte )) + fi + truncate -s "$diskSize" $diskImage printf "Automatic disk size...\n" From fe8de6564ddce3ce80e6ca11aeab2e3c043cf021 Mon Sep 17 00:00:00 2001 From: Luflosi Date: Sun, 25 Apr 2021 22:43:21 +0200 Subject: [PATCH 12/28] linuxPackages.usbip: clarify license --- pkgs/os-specific/linux/usbip/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/os-specific/linux/usbip/default.nix b/pkgs/os-specific/linux/usbip/default.nix index d98559c4600..43c22a8fd12 100644 --- a/pkgs/os-specific/linux/usbip/default.nix +++ b/pkgs/os-specific/linux/usbip/default.nix @@ -27,7 +27,7 @@ stdenv.mkDerivation { meta = with lib; { homepage = "https://github.com/torvalds/linux/tree/master/tools/usb/usbip"; description = "allows to pass USB device from server to client over the network"; - license = licenses.gpl2; + license = with licenses; [ gpl2Only gpl2Plus ]; platforms = platforms.linux; broken = kernelOlder "4.10"; }; From 486825e7c8f73f425e76174477eaa90ce2ab92d2 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Sun, 25 Apr 2021 22:55:25 +0000 Subject: [PATCH 13/28] flacon: 6.1.0 -> 7.0.1 --- pkgs/applications/audio/flacon/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/audio/flacon/default.nix b/pkgs/applications/audio/flacon/default.nix index a9dc7308aca..83d9c5da838 100644 --- a/pkgs/applications/audio/flacon/default.nix +++ b/pkgs/applications/audio/flacon/default.nix @@ -4,13 +4,13 @@ stdenv.mkDerivation rec { pname = "flacon"; - version = "6.1.0"; + version = "7.0.1"; src = fetchFromGitHub { owner = "flacon"; repo = "flacon"; rev = "v${version}"; - sha256 = "04yp3aym7h70xjni9ancqv5lc4zds5a8dgw3fzgqs8k5nmh074gv"; + sha256 = "sha256-35tARJkyhC8EisIyDCwuT/UUruzLjJRUuZysuqeNssM="; }; nativeBuildInputs = [ cmake pkg-config wrapQtAppsHook ]; From f20ae954d57f7fa4f007a000291dc1644036570f Mon Sep 17 00:00:00 2001 From: Martin Schwaighofer Date: Tue, 20 Apr 2021 23:00:05 +0200 Subject: [PATCH 14/28] make-disk-image: fix broken EFI image builds Work around missing /dev files inside runInLinuxVM by creating a symlink before calling nixos-enter. This fixes https://github.com/NixOS/nixpkgs/issues/93381. I ran into this issue when trying to create a VMware image that boots from EFI. Thanks @colemickens for reporting this and @danielfullmer for fixing the same thing in in qemu-vm.nix (37676e77cb5adab936606838d6465faafda54f61) and explaining what the issue was. --- nixos/lib/make-disk-image.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nixos/lib/make-disk-image.nix b/nixos/lib/make-disk-image.nix index 023d0791a5c..88c87bcd568 100644 --- a/nixos/lib/make-disk-image.nix +++ b/nixos/lib/make-disk-image.nix @@ -283,6 +283,9 @@ in pkgs.vmTools.runInLinuxVM ( # Some tools assume these exist ln -s vda /dev/xvda ln -s vda /dev/sda + # make systemd-boot find ESP without udev + mkdir /dev/block + ln -s /dev/vda1 /dev/block/254:1 mountPoint=/mnt mkdir $mountPoint From f2744c6b80e2be6e3c87d9bb35b9716b4f1301ae Mon Sep 17 00:00:00 2001 From: Morgan Jones Date: Sun, 25 Apr 2021 17:41:30 -0600 Subject: [PATCH 15/28] wsjtx: 2.2.2 -> 2.3.1 --- pkgs/applications/radio/wsjtx/default.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/applications/radio/wsjtx/default.nix b/pkgs/applications/radio/wsjtx/default.nix index 697a28e4be9..ae378b57106 100644 --- a/pkgs/applications/radio/wsjtx/default.nix +++ b/pkgs/applications/radio/wsjtx/default.nix @@ -1,15 +1,15 @@ { lib, stdenv, fetchurl, asciidoc, asciidoctor, autoconf, automake, cmake, docbook_xsl, fftw, fftwFloat, gfortran, libtool, libusb1, qtbase, - qtmultimedia, qtserialport, qttools, texinfo, wrapQtAppsHook }: + qtmultimedia, qtserialport, qttools, boost, texinfo, wrapQtAppsHook }: stdenv.mkDerivation rec { pname = "wsjtx"; - version = "2.2.2"; + version = "2.3.1"; # This is a "superbuild" tarball containing both wsjtx and a hamlib fork src = fetchurl { url = "http://physics.princeton.edu/pulsar/k1jt/wsjtx-${version}.tgz"; - sha256 = "17agyrhclqyahgdwba8vi9sl7vq03sm00jlyrmjgv34a4czidg0w"; + sha256 = "11wzh4bxp9277kbqkyrc063akkk09czgxnkpk8k07vl4s3dan3hh"; }; # Hamlib builds with autotools, wsjtx builds with cmake @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { asciidoc asciidoctor autoconf automake cmake docbook_xsl gfortran libtool qttools texinfo wrapQtAppsHook ]; - buildInputs = [ fftw fftwFloat libusb1 qtbase qtmultimedia qtserialport ]; + buildInputs = [ fftw fftwFloat libusb1 qtbase qtmultimedia qtserialport boost ]; # Remove Git dependency from superbuild since sources are included patches = [ ./super.patch ]; @@ -36,6 +36,6 @@ stdenv.mkDerivation rec { # Older licenses are for the statically-linked hamlib license = with licenses; [ gpl3Plus gpl2Plus lgpl21Plus ]; platforms = platforms.linux; - maintainers = with maintainers; [ lasandell ]; + maintainers = with maintainers; [ lasandell numinit ]; }; } From 1f53e83fa0d69879798ff1e35d4b02d9dc11dc02 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Mon, 26 Apr 2021 00:51:58 +0000 Subject: [PATCH 16/28] grype: 0.10.2 -> 0.11.0 --- pkgs/tools/security/grype/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/security/grype/default.nix b/pkgs/tools/security/grype/default.nix index 5db1f1d20e7..7323d092472 100644 --- a/pkgs/tools/security/grype/default.nix +++ b/pkgs/tools/security/grype/default.nix @@ -6,16 +6,16 @@ buildGoModule rec { pname = "grype"; - version = "0.10.2"; + version = "0.11.0"; src = fetchFromGitHub { owner = "anchore"; repo = pname; rev = "v${version}"; - sha256 = "sha256-kKzrV2TTO8NmB3x27ZStMZpSIRGwm5Ev+cPGwT50FEU="; + sha256 = "sha256-E1tJ9hEJ4GaL+S4dz6aGq3nJPpdtx0/Tfb1RzgJSe8M="; }; - vendorSha256 = "sha256-PC2n6+gPDxpG8RTAmCfK4P40yfxqlleYI6Ex4FtPjk4="; + vendorSha256 = "sha256-LUyrX/rm01tCPT6Ua6hphhf+4ycNn4tLONRyH3iTrZ4="; propagatedBuildInputs = [ docker ]; From 4d538804081498a807b9a0e22ae11c54a0251eba Mon Sep 17 00:00:00 2001 From: sternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org> Date: Sun, 25 Apr 2021 16:45:11 +0200 Subject: [PATCH 17/28] ocamlPackages.hpack: init at 0.8.0 --- .../ocaml-modules/hpack/default.nix | 37 +++++++++++++++++++ pkgs/top-level/ocaml-packages.nix | 2 + 2 files changed, 39 insertions(+) create mode 100644 pkgs/development/ocaml-modules/hpack/default.nix diff --git a/pkgs/development/ocaml-modules/hpack/default.nix b/pkgs/development/ocaml-modules/hpack/default.nix new file mode 100644 index 00000000000..ec967312b87 --- /dev/null +++ b/pkgs/development/ocaml-modules/hpack/default.nix @@ -0,0 +1,37 @@ +{ buildDunePackage +, lib +, fetchurl +, angstrom +, faraday +}: + +buildDunePackage rec { + pname = "hpack"; + version = "0.8.0"; + + src = fetchurl { + url = "https://github.com/anmonteiro/ocaml-h2/releases/download/${version}/h2-${version}.tbz"; + sha256 = "0qcn3yvyz0h419fjg9nb20csfmwmh3ihz0zb0jfzdycf5w4mlry6"; + }; + + useDune2 = true; + minimumOCamlVersion = "4.04"; + + propagatedBuildInputs = [ + angstrom + faraday + ]; + + # circular dependency + doCheck = false; + + meta = { + license = lib.licenses.bsd3; + description = "An HPACK (Header Compression for HTTP/2) implementation in OCaml"; + homepage = "https://github.com/anmonteiro/ocaml-h2"; + maintainers = with lib.maintainers; [ + sternenseemann + anmonteiro + ]; + }; +} diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index c7891a1821e..30ebf6680bb 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -413,6 +413,8 @@ let hmap = callPackage ../development/ocaml-modules/hmap { }; + hpack = callPackage ../development/ocaml-modules/hpack { }; + hxd = callPackage ../development/ocaml-modules/hxd { }; imagelib = callPackage ../development/ocaml-modules/imagelib { }; From f4c229058da13060c3a1f6fdf67d238cbe4882a7 Mon Sep 17 00:00:00 2001 From: sternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org> Date: Sun, 25 Apr 2021 16:46:11 +0200 Subject: [PATCH 18/28] ocamlPackages.h2: init at 0.8.0 --- pkgs/development/ocaml-modules/h2/default.nix | 59 +++++++++++++++++++ pkgs/top-level/ocaml-packages.nix | 2 + 2 files changed, 61 insertions(+) create mode 100644 pkgs/development/ocaml-modules/h2/default.nix diff --git a/pkgs/development/ocaml-modules/h2/default.nix b/pkgs/development/ocaml-modules/h2/default.nix new file mode 100644 index 00000000000..dd96e0ecc44 --- /dev/null +++ b/pkgs/development/ocaml-modules/h2/default.nix @@ -0,0 +1,59 @@ +{ buildDunePackage +, lib +, fetchFromGitHub +, ocaml +, hpack +, angstrom +, faraday +, base64 +, psq +, httpaf +, alcotest +, yojson +, hex +}: + +let + http2-frame-test-case = fetchFromGitHub { + owner = "http2jp"; + repo = "http2-frame-test-case"; + rev = "5c67db0d4d68e1fb7d3a241d6e01fc04d981f465"; + sha256 = "16yyb37f8mk9saw7ndjs5is67yq7qa6b6y7k0c75ibxi4n9aw1r3"; + }; +in + +buildDunePackage rec { + pname = "h2"; + + inherit (hpack) + version + src + useDune2 + ; + + minimumOCamlVersion = "4.06"; + + propagatedBuildInputs = [ + angstrom + faraday + base64 + psq + hpack + httpaf + ]; + + # Tests fail with 4.06 + doCheck = lib.versionAtLeast ocaml.version "4.07"; + preCheck = '' + ln -s "${http2-frame-test-case}" lib_test/http2-frame-test-case + ''; + checkInputs = [ + alcotest + yojson + hex + ]; + + meta = hpack.meta // { + description = "A high-performance, memory-efficient, and scalable HTTP/2 library for OCaml"; + }; +} diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 30ebf6680bb..56d992a9263 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -401,6 +401,8 @@ let inherit (pkgs) gsl; }; + h2 = callPackage ../development/ocaml-modules/h2 { }; + hacl_x25519 = callPackage ../development/ocaml-modules/hacl_x25519 { }; herelib = callPackage ../development/ocaml-modules/herelib { }; From 35dfa0e927924956cd47c083709a8147afea6d3d Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Mon, 19 Apr 2021 10:15:12 +0200 Subject: [PATCH 19/28] =?UTF-8?q?alt-ergo:=202.3.3=20=E2=86=92=202.4.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../science/logic/alt-ergo/default.nix | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/pkgs/applications/science/logic/alt-ergo/default.nix b/pkgs/applications/science/logic/alt-ergo/default.nix index dd72d148e29..963015b11d5 100644 --- a/pkgs/applications/science/logic/alt-ergo/default.nix +++ b/pkgs/applications/science/logic/alt-ergo/default.nix @@ -1,12 +1,14 @@ -{ fetchurl, lib, which, ocamlPackages }: +{ fetchFromGitHub, lib, which, ocamlPackages }: let pname = "alt-ergo"; - version = "2.3.3"; + version = "2.4.0"; - src = fetchurl { - url = "https://alt-ergo.ocamlpro.com/http/alt-ergo-${version}/alt-ergo-${version}.tar.gz"; - sha256 = "124k2a4ikk4wdpmvgjpgl97x9skvr9qznk8m68dzsynzpv6yksaj"; + src = fetchFromGitHub { + owner = "OCamlPro"; + repo = pname; + rev = version; + sha256 = "1jm1yrvsg8iyfp9bb728zdx2i7yb6z7minjrfs27k5ncjqkjm65g"; }; useDune2 = true; @@ -19,6 +21,7 @@ let alt-ergo-lib = ocamlPackages.buildDunePackage rec { pname = "alt-ergo-lib"; inherit version src useDune2 nativeBuildInputs; configureFlags = pname; + buildInputs = with ocamlPackages; [ dune-configurator ]; propagatedBuildInputs = with ocamlPackages; [ num ocplib-simplex stdlib-shims zarith ]; }; in @@ -36,7 +39,9 @@ ocamlPackages.buildDunePackage { configureFlags = pname; - buildInputs = [ alt-ergo-parsers ocamlPackages.menhir ]; + buildInputs = [ alt-ergo-parsers ] ++ (with ocamlPackages; [ + cmdliner menhir ]) + ; meta = { description = "High-performance theorem prover and SMT solver"; From b516dbfbd91676371f03ea81a0c5dc7e343fde02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Mon, 26 Apr 2021 10:00:50 +0200 Subject: [PATCH 20/28] ffmpegthumbnailer: use ffmpeg instead of ffmpeg_3 (#120611) --- pkgs/development/libraries/ffmpegthumbnailer/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/ffmpegthumbnailer/default.nix b/pkgs/development/libraries/ffmpegthumbnailer/default.nix index 2e68dbb1d12..dfdbf8eb2f8 100644 --- a/pkgs/development/libraries/ffmpegthumbnailer/default.nix +++ b/pkgs/development/libraries/ffmpegthumbnailer/default.nix @@ -1,4 +1,4 @@ -{ fetchFromGitHub, lib, stdenv, ffmpeg_3, cmake, libpng, pkg-config, libjpeg +{ fetchFromGitHub, lib, stdenv, ffmpeg, cmake, libpng, pkg-config, libjpeg }: stdenv.mkDerivation rec { @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ cmake pkg-config ]; - buildInputs = [ ffmpeg_3 libpng libjpeg ]; + buildInputs = [ ffmpeg libpng libjpeg ]; cmakeFlags = [ "-DENABLE_THUMBNAILER=ON" ]; meta = with lib; { From 0e391039ed045f7d3dc7aa48adf4ad20b3fe759c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Mon, 26 Apr 2021 10:04:34 +0200 Subject: [PATCH 21/28] mousai: init at 0.3.1 (#120552) --- pkgs/applications/audio/mousai/default.nix | 69 ++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 71 insertions(+) create mode 100644 pkgs/applications/audio/mousai/default.nix diff --git a/pkgs/applications/audio/mousai/default.nix b/pkgs/applications/audio/mousai/default.nix new file mode 100644 index 00000000000..502842c7aa7 --- /dev/null +++ b/pkgs/applications/audio/mousai/default.nix @@ -0,0 +1,69 @@ +{ lib +, python3 +, fetchFromGitHub +, appstream-glib +, desktop-file-utils +, gettext +, glib +, gobject-introspection +, gst_all_1 +, gtk3 +, libhandy +, librsvg +, meson +, ninja +, pkg-config +, wrapGAppsHook +}: + +python3.pkgs.buildPythonApplication rec { + pname = "mousai"; + version = "0.3.1"; + + format = "other"; + + src = fetchFromGitHub { + owner = "SeaDve"; + repo = "Mousai"; + rev = "v${version}"; + sha256 = "0x57dci0prhlj79h74yh79cazn48rn0bckz5j3z4njk4fwc3fvfx"; + }; + + postPatch = '' + patchShebangs build-aux/meson + ''; + + nativeBuildInputs = [ + appstream-glib + desktop-file-utils + gettext + glib + gtk3 + meson + ninja + pkg-config + wrapGAppsHook + ]; + + buildInputs = [ + gobject-introspection + gst_all_1.gstreamer + gst_all_1.gst-plugins-base + gst_all_1.gst-plugins-good + gtk3 + libhandy + librsvg + ]; + + propagatedBuildInputs = with python3.pkgs; [ + pygobject3 + requests + ]; + + meta = with lib; { + description = "Identify any songs in seconds"; + homepage = "https://github.com/SeaDve/Mousai"; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ dotlambda ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index aba778bfa6b..30b49b3f71f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -24657,6 +24657,8 @@ in motif = callPackage ../development/libraries/motif { }; + mousai = callPackage ../applications/audio/mousai { }; + mozjpeg = callPackage ../applications/graphics/mozjpeg { }; easytag = callPackage ../applications/audio/easytag { }; From cde5ca089a76b52cf724f6781c06d7f0ea26b377 Mon Sep 17 00:00:00 2001 From: Mihai Fufezan Date: Sat, 24 Apr 2021 11:53:17 +0300 Subject: [PATCH 22/28] openboard: init at 1.6.1 --- .../graphics/openboard/default.nix | 116 ++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 118 insertions(+) create mode 100644 pkgs/applications/graphics/openboard/default.nix diff --git a/pkgs/applications/graphics/openboard/default.nix b/pkgs/applications/graphics/openboard/default.nix new file mode 100644 index 00000000000..0aff3c997ff --- /dev/null +++ b/pkgs/applications/graphics/openboard/default.nix @@ -0,0 +1,116 @@ +{ mkDerivation, lib, fetchFromGitHub, copyDesktopItems, makeDesktopItem, qmake +, qtbase, qtxmlpatterns, qttools, qtwebkit, libGL, fontconfig, openssl, poppler +, ffmpeg, libva, alsaLib, SDL, x264, libvpx, libvorbis, libtheora, libogg +, libopus, lame, fdk_aac, libass, quazip, libXext, libXfixes }: + +let + importer = mkDerivation rec { + pname = "openboard-importer"; + version = "unstable-2016-10-08"; + + src = fetchFromGitHub { + owner = "OpenBoard-org"; + repo = "OpenBoard-Importer"; + rev = "47927bda021b4f7f1540b794825fb0d601875e79"; + sha256 = "19zhgsimy0f070caikc4vrrqyc8kv2h6rl37sy3iggks8z0g98gf"; + }; + + nativeBuildInputs = [ qmake ]; + + installPhase = '' + install -Dm755 OpenBoardImporter $out/bin/OpenBoardImporter + ''; + }; +in mkDerivation rec { + pname = "openboard"; + version = "1.6.1"; + + src = fetchFromGitHub { + owner = "OpenBoard-org"; + repo = "OpenBoard"; + rev = "v${version}"; + sha256 = "sha256-OlGXGIMghil/GG6eso20+CWo/hCjarXGs6edXX9pc/M="; + }; + + postPatch = '' + substituteInPlace OpenBoard.pro \ + --replace '/usr/include/quazip' '${quazip}/include/quazip5' \ + --replace '/usr/include/poppler' '${poppler.dev}/include/poppler' + ''; + + nativeBuildInputs = [ qmake copyDesktopItems ]; + + buildInputs = [ + qtbase + qtxmlpatterns + qttools + qtwebkit + libGL + fontconfig + openssl + poppler + ffmpeg + libva + alsaLib + SDL + x264 + libvpx + libvorbis + libtheora + libogg + libopus + lame + fdk_aac + libass + quazip + libXext + libXfixes + ]; + + propagatedBuildInputs = [ importer ]; + + makeFlags = [ "release-install" ]; + + desktopItems = [ + (makeDesktopItem { + name = "OpenBoard"; + exec = "OpenBoard %f"; + icon = "OpenBoard"; + comment = ""; + desktopName = "OpenBoard"; + mimeType = "application/ubz"; + categories = "Education;"; + startupNotify = true; + }) + ]; + + installPhase = '' + runHook preBuild + + lrelease OpenBoard.pro + + # Replicated release_scripts/linux/package.sh + mkdir -p $out/opt/openboard/i18n + cp -R resources/customizations build/linux/release/product/* $out/opt/openboard/ + cp resources/i18n/*.qm $out/opt/openboard/i18n/ + install -m644 resources/linux/openboard-ubz.xml $out/opt/openboard/etc/ + install -Dm644 resources/images/OpenBoard.png $out/share/icons/hicolor/64x64/apps/OpenBoard.png + + runHook postBuild + ''; + + dontWrapQtApps = true; + + postFixup = '' + makeWrapper $out/opt/openboard/OpenBoard $out/bin/OpenBoard \ + "''${qtWrapperArgs[@]}" + ''; + + meta = with lib; { + description = + "Cross-platform interactive whiteboard application intended for use in a classroom setting"; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ fufexan ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 1ad15c084ab..d6b368f3526 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7120,6 +7120,8 @@ in openbazaar = callPackage ../applications/networking/openbazaar { }; openbazaar-client = callPackage ../applications/networking/openbazaar/client.nix { }; + openboard = libsForQt5.callPackage ../applications/graphics/openboard { }; + opencc = callPackage ../tools/text/opencc { }; opencl-info = callPackage ../tools/system/opencl-info { }; From d1f0a17d399def947ffdbc2ac8bf040e478d5a78 Mon Sep 17 00:00:00 2001 From: Mihai Fufezan <36706276+fufexan@users.noreply.github.com> Date: Mon, 26 Apr 2021 11:54:53 +0300 Subject: [PATCH 23/28] Update pkgs/applications/graphics/openboard/default.nix Co-authored-by: Christoph Neidahl --- pkgs/applications/graphics/openboard/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/graphics/openboard/default.nix b/pkgs/applications/graphics/openboard/default.nix index 0aff3c997ff..73166ea4d52 100644 --- a/pkgs/applications/graphics/openboard/default.nix +++ b/pkgs/applications/graphics/openboard/default.nix @@ -85,7 +85,7 @@ in mkDerivation rec { ]; installPhase = '' - runHook preBuild + runHook preInstall lrelease OpenBoard.pro From b15302a4d32b3ebe24872e61d852bb4df527d266 Mon Sep 17 00:00:00 2001 From: Mihai Fufezan <36706276+fufexan@users.noreply.github.com> Date: Mon, 26 Apr 2021 11:54:58 +0300 Subject: [PATCH 24/28] Update pkgs/applications/graphics/openboard/default.nix Co-authored-by: Christoph Neidahl --- pkgs/applications/graphics/openboard/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/graphics/openboard/default.nix b/pkgs/applications/graphics/openboard/default.nix index 73166ea4d52..e1dda5000fa 100644 --- a/pkgs/applications/graphics/openboard/default.nix +++ b/pkgs/applications/graphics/openboard/default.nix @@ -96,7 +96,7 @@ in mkDerivation rec { install -m644 resources/linux/openboard-ubz.xml $out/opt/openboard/etc/ install -Dm644 resources/images/OpenBoard.png $out/share/icons/hicolor/64x64/apps/OpenBoard.png - runHook postBuild + runHook postInstall ''; dontWrapQtApps = true; From e2da9e634d2d56fcf76800cc4bf719f52da1936f Mon Sep 17 00:00:00 2001 From: Mihai Fufezan <36706276+fufexan@users.noreply.github.com> Date: Mon, 26 Apr 2021 11:55:12 +0300 Subject: [PATCH 25/28] Update pkgs/applications/graphics/openboard/default.nix Co-authored-by: Christoph Neidahl --- pkgs/applications/graphics/openboard/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/graphics/openboard/default.nix b/pkgs/applications/graphics/openboard/default.nix index e1dda5000fa..fefe34dc097 100644 --- a/pkgs/applications/graphics/openboard/default.nix +++ b/pkgs/applications/graphics/openboard/default.nix @@ -76,7 +76,7 @@ in mkDerivation rec { name = "OpenBoard"; exec = "OpenBoard %f"; icon = "OpenBoard"; - comment = ""; + comment = "OpenBoard, an interactive white board application"; desktopName = "OpenBoard"; mimeType = "application/ubz"; categories = "Education;"; From 8a41a6077344348a7514fea10f06e373e26ddc73 Mon Sep 17 00:00:00 2001 From: Mihai Fufezan Date: Mon, 26 Apr 2021 12:33:53 +0300 Subject: [PATCH 26/28] openboard: update meta.description --- pkgs/applications/graphics/openboard/default.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkgs/applications/graphics/openboard/default.nix b/pkgs/applications/graphics/openboard/default.nix index fefe34dc097..859c2219218 100644 --- a/pkgs/applications/graphics/openboard/default.nix +++ b/pkgs/applications/graphics/openboard/default.nix @@ -107,8 +107,7 @@ in mkDerivation rec { ''; meta = with lib; { - description = - "Cross-platform interactive whiteboard application intended for use in a classroom setting"; + description = "Interactive whiteboard application"; license = licenses.gpl3Plus; maintainers = with maintainers; [ fufexan ]; platforms = platforms.linux; From 1586cbd915e652a6a204c11ec55dc7678fd3a322 Mon Sep 17 00:00:00 2001 From: Ingo Blechschmidt Date: Mon, 26 Apr 2021 11:43:42 +0200 Subject: [PATCH 27/28] castty: init at 2020-11-10 (#120478) Co-authored-by: Fabian Affolter Co-authored-by: Sandro --- pkgs/tools/misc/castty/default.nix | 25 +++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 27 insertions(+) create mode 100644 pkgs/tools/misc/castty/default.nix diff --git a/pkgs/tools/misc/castty/default.nix b/pkgs/tools/misc/castty/default.nix new file mode 100644 index 00000000000..ddda737c8b5 --- /dev/null +++ b/pkgs/tools/misc/castty/default.nix @@ -0,0 +1,25 @@ +{ stdenv, lib, fetchFromGitHub, libsoundio, lame }: + +stdenv.mkDerivation { + pname = "castty"; + version = "unstable-2020-11-10"; + + src = fetchFromGitHub { + owner = "dhobsd"; + repo = "castty"; + rev = "333a2bafd96d56cd0bb91577ae5ba0f7d81b3d99"; + sha256 = "0p84ivwsp8ds4drn0hx2ax04gp0xyq6blj1iqfsmrs4slrajdmqs"; + }; + + buildInputs = [ libsoundio lame ]; + + makeFlags = [ "PREFIX=$(out)" ]; + + meta = with lib; { + description = "CLI tool to record audio-enabled screencasts of your terminal, for the web"; + homepage = "https://github.com/dhobsd/castty"; + license = licenses.bsd3; + maintainers = with maintainers; [ iblech ]; + platforms = platforms.unix; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 30b49b3f71f..3d279513292 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1235,6 +1235,8 @@ in inherit (nodePackages) castnow; + castty = callPackage ../tools/misc/castty { }; + certigo = callPackage ../tools/admin/certigo { }; catcli = python3Packages.callPackage ../tools/filesystems/catcli { }; From b164642941e7060f5c565e85746239e96f323cd1 Mon Sep 17 00:00:00 2001 From: happysalada Date: Mon, 26 Apr 2021 19:54:29 +0900 Subject: [PATCH 28/28] fishplugins.forgit: init "unstable-2021-04-09" --- pkgs/shells/fish/plugins/default.nix | 2 ++ pkgs/shells/fish/plugins/forgit.nix | 22 ++++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 pkgs/shells/fish/plugins/forgit.nix diff --git a/pkgs/shells/fish/plugins/default.nix b/pkgs/shells/fish/plugins/default.nix index c886173096e..42252ccbe38 100644 --- a/pkgs/shells/fish/plugins/default.nix +++ b/pkgs/shells/fish/plugins/default.nix @@ -15,6 +15,8 @@ lib.makeScope newScope (self: with self; { foreign-env = callPackage ./foreign-env { }; + forgit-fish = callPackage ./forgit.nix { }; + fzf-fish = callPackage ./fzf-fish.nix { }; pure = callPackage ./pure.nix { }; diff --git a/pkgs/shells/fish/plugins/forgit.nix b/pkgs/shells/fish/plugins/forgit.nix new file mode 100644 index 00000000000..b905b7a2589 --- /dev/null +++ b/pkgs/shells/fish/plugins/forgit.nix @@ -0,0 +1,22 @@ +{ lib, buildFishPlugin, fetchFromGitHub, git, fzf }: + +buildFishPlugin rec { + pname = "forgit"; + version = "unstable-2021-04-09"; + + buildInputs = [ git fzf ]; + + src = fetchFromGitHub { + owner = "wfxr"; + repo = "forgit"; + rev = "7806fc3ab37ac479c315eb54b164f67ba9ed17ea"; + sha256 = "sha256-a7wjuqXe3+y5zlgSLk5J31WoORbieFimvtr0FQHRY5M="; + }; + + meta = with lib; { + description = "A utility tool powered by fzf for using git interactively."; + homepage = "https://github.com/wfxr/forgit"; + license = licenses.mit; + maintainers = with maintainers; [ happysalada ]; + }; +}