about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--pkgs/by-name/st/stamp/package.nix1
-rwxr-xr-xpkgs/by-name/st/stamp/stamp.sh60
-rw-r--r--pkgs/by-name/yt/yt/package.nix6
3 files changed, 39 insertions, 28 deletions
diff --git a/pkgs/by-name/st/stamp/package.nix b/pkgs/by-name/st/stamp/package.nix
index f39e2197..703f73e3 100644
--- a/pkgs/by-name/st/stamp/package.nix
+++ b/pkgs/by-name/st/stamp/package.nix
@@ -10,6 +10,7 @@ sysLib.writeShellScript {
   src = ./stamp.sh;
   generateCompletions = false;
   keepPath = false;
+
   dependencies = [
     findutils
     fd
diff --git a/pkgs/by-name/st/stamp/stamp.sh b/pkgs/by-name/st/stamp/stamp.sh
index c3697c99..0fced956 100755
--- a/pkgs/by-name/st/stamp/stamp.sh
+++ b/pkgs/by-name/st/stamp/stamp.sh
@@ -5,49 +5,48 @@ SHELL_LIBRARY_VERSION="2.1.2" . %SHELL_LIBRARY_PATH
 
 help() {
     cat <<EOF
-A simply file copyright menagment system
+A simple file copyright management system.
 
 USAGE:
-    stamp [OPTIONS] COMMAND
+    stamp [OPTIONS] FILES_OR_DIRECTORIES
 
 OPTIONS:
-    --help      | -h
+    --help          | -h
                             Display this help and exit.
 
-    --license   | -l L
+    --license L     | -l L
                             Specify a license.
-COMMANDS:
-    copyright FILES_OR_DIRECTORIES
-                            Add your copyright information to this file [this is the default command].
+                            This defaults to the GPL-3.0-or-later.
 
-    c FILES_OR_DIRECTORIES
-                            An alias for the copyright above.
+    --copyright C   | -c C
+                            Specify a copyright string (e.g. name and email).
+                            By default this is constructed from the git user.name and user.email
 ARGUMENTS:
     FILES_OR_DIRECTORIES := [[ fd . --max-depth 3 ]]
                             Possible files to stamp.
 
     L                    := GPL-3.0-or-later|CC-BY-SA-4.0|AGPL-3.0-or-later
                             A possible license identifier. These above are only suggestions.
+
+    C                    := [[ true ]]
+                            This can be anything, which represents a copyright string.
+                            Commenly that is a combination of a name and an email.
 EOF
 }
 
 reuse_run() {
     root="$(git rev-parse --show-toplevel)"
 
+    template=""
     if [ -e "$root/.reuse/templates/default.jinja2" ]; then
-        reuse annotate \
-            --copyright "$(git config --get user.name) <$(git config --get user.email)>" \
-            --copyright-style string-c \
-            --template default \
-            --fallback-dot-license \
-            --license "$license" "$1"
-    else
-        reuse annotate \
-            --copyright "$(git config --get user.name) <$(git config --get user.email)>" \
-            --copyright-style string-c \
-            --fallback-dot-license \
-            --license "$license" "$1"
+        template="--template=default"
     fi
+
+    reuse annotate \
+        --copyright="$copyright" \
+        --copyright-prefix=string-c $template \
+        --fallback-dot-license \
+        --license="$license" -- "$1"
 }
 
 for arg in "$@"; do
@@ -62,21 +61,32 @@ done
 [ "$(git rev-parse --is-inside-work-tree)" = "true" ] || die "You need to be in a git directory"
 
 run=true
+license="GPL-3.0-or-later"
+copyright="$(git config --get user.name) <$(git config --get user.email)>"
 while [ "$#" -gt 0 ] && [ "$run" = true ]; do
     case "$1" in
     "--license" | "-l")
         shift 1
         license="$1"
-        [ "$license" ] || die "No license specified. See --help for more."
+        [ "$license" ] || die "No license specified. See --help for usage."
         shift 1
         ;;
-    "copyright" | "c")
+    "--copyright" | "-c")
+        shift 1
+        copyright="$1"
+        [ "$copyright" ] || die "No copyright string specified. See --help for usage."
         shift 1
-        # The files should now be in $@
+        ;;
+    "--")
         run=false
+        shift 1
+        ;;
+    -*)
+        die "Unknown option: '$1' (if you intented this to be a path use '--' before it.)"
         ;;
     *)
-        die "Unknown command: $1"
+        # We reached the end of the options.
+        run=false
         ;;
     esac
 done
diff --git a/pkgs/by-name/yt/yt/package.nix b/pkgs/by-name/yt/yt/package.nix
index 6cb41ae7..d76efd25 100644
--- a/pkgs/by-name/yt/yt/package.nix
+++ b/pkgs/by-name/yt/yt/package.nix
@@ -12,12 +12,12 @@
   sqlite,
   blake3,
 }: let
-  version = "1.4";
+  version = "1.4.1";
 
   src = fetchgit {
     url = "https://git.vhack.eu/soispha/clients/yt";
     rev = "v${version}";
-    hash = "sha256-PNCwiZr05macPef1DueTOm000yXa6i1D0FWeESluyMo=";
+    hash = "sha256-Zuc3hrhvYdz2ktQhfMcLX7E5W/ZneMMLJ6+CoJ/JZMs=";
   };
 
   buildInputs = [
@@ -59,7 +59,7 @@ in
       bash ./scripts/mkdb.sh
     '';
 
-    cargoHash = "sha256-gpXZV2jHCcsj8zxqfl+yTa4MUeAUansgcKh7997bpNk=";
+    cargoHash = "sha256-QIAZb8twLxLm3TJOtb++pTWz98v49pt13auAEAeYFSk=";
 
     postBuild = ''
       install -m755 ./python_update/raw_update.py -D "$out/bin/raw_update.py"