From f4c243b1200d4b068a97e4847ecff9f342872ca8 Mon Sep 17 00:00:00 2001 From: ners Date: Mon, 22 May 2023 15:05:02 +0200 Subject: [PATCH] ssdfs-utils: init at 4.24 --- .../tools/filesystems/ssdfs-utils/default.nix | 47 +++++++++++++++++++ pkgs/tools/filesystems/ssdfs-utils/update.sh | 14 ++++++ pkgs/top-level/all-packages.nix | 2 + 3 files changed, 63 insertions(+) create mode 100644 pkgs/tools/filesystems/ssdfs-utils/default.nix create mode 100755 pkgs/tools/filesystems/ssdfs-utils/update.sh diff --git a/pkgs/tools/filesystems/ssdfs-utils/default.nix b/pkgs/tools/filesystems/ssdfs-utils/default.nix new file mode 100644 index 000000000000..04f348b2528a --- /dev/null +++ b/pkgs/tools/filesystems/ssdfs-utils/default.nix @@ -0,0 +1,47 @@ +{ lib +, stdenv +, fetchFromGitHub +, autoreconfHook +, libtool +, libuuid +, zlib +}: + +stdenv.mkDerivation { + # The files and commit messages in the repository refer to the package + # as ssdfs-utils, not ssdfs-tools. + pname = "ssdfs-utils"; + # The version is taken from `configure.ac`, there are no tags. + version = "4.24"; + + src = fetchFromGitHub { + owner = "dubeyko"; + repo = "ssdfs-tools"; + rev = "0a3ca85b454e56cf2422f33663639ad13fc792dd"; + hash = "sha256-pzpwbvo0BR4fG6Cnxb9GdH/UZlJ6C5am7TULSLEzdvI="; + }; + + strictDeps = true; + + nativeBuildInputs = [ + autoreconfHook + ]; + + buildInputs = [ + libtool + libuuid + zlib + ]; + + passthru = { + updateScript = ./update.sh; + }; + + meta = with lib; { + description = "SSDFS file system utilities"; + homepage = "https://github.com/dubeyko/ssdfs-tools"; + license = licenses.bsd3Clear; + maintainers = with maintainers; [ ners ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/tools/filesystems/ssdfs-utils/update.sh b/pkgs/tools/filesystems/ssdfs-utils/update.sh new file mode 100755 index 000000000000..b30d7bd3357c --- /dev/null +++ b/pkgs/tools/filesystems/ssdfs-utils/update.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env nix-shell +#!nix-shell -i bash -p curl gnugrep common-updater-scripts +set -euo pipefail + +owner=dubeyko +repo=ssdfs-tools + +version="$(curl --silent https://raw.githubusercontent.com/${owner}/${repo}/master/configure.ac | \ + grep 'AC_INIT(ssdfs' | \ + egrep -o '[0-9\.]{3,}')" + +rev=$(curl -s -H "Accept: application/vnd.github.VERSION.sha" https://api.github.com/repos/${owner}/${repo}/commits/master) + +update-source-version ssdfs-utils "$version" --rev="$rev" diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 05d33472cf76..9143666b0c1b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4122,6 +4122,8 @@ with pkgs; btrfs-snap = callPackage ../tools/filesystems/btrfs-snap { }; + ssdfs-utils = callPackage ../tools/filesystems/ssdfs-utils { }; + btlejack = python3Packages.callPackage ../applications/radio/btlejack { }; btrbk = callPackage ../tools/backup/btrbk { };