From 42b9d038489b36c4995cae6ba673fdb095f5699b Mon Sep 17 00:00:00 2001 From: Michael Adler Date: Mon, 30 Sep 2024 17:04:01 +0200 Subject: [PATCH 1/2] notmuch-mailmover: migrate to pkgs/by-name, format, add updateScript --- .../no/notmuch-mailmover/package.nix} | 19 +++++++++++++------ pkgs/top-level/all-packages.nix | 1 - 2 files changed, 13 insertions(+), 7 deletions(-) rename pkgs/{applications/networking/mailreaders/notmuch/notmuch-mailmover.nix => by-name/no/notmuch-mailmover/package.nix} (80%) diff --git a/pkgs/applications/networking/mailreaders/notmuch/notmuch-mailmover.nix b/pkgs/by-name/no/notmuch-mailmover/package.nix similarity index 80% rename from pkgs/applications/networking/mailreaders/notmuch/notmuch-mailmover.nix rename to pkgs/by-name/no/notmuch-mailmover/package.nix index 3b6d2ee9285f..cccb07af7796 100644 --- a/pkgs/applications/networking/mailreaders/notmuch/notmuch-mailmover.nix +++ b/pkgs/by-name/no/notmuch-mailmover/package.nix @@ -1,8 +1,10 @@ -{ notmuch -, lib -, fetchFromGitHub -, rustPlatform -, installShellFiles +{ + notmuch, + lib, + fetchFromGitHub, + rustPlatform, + installShellFiles, + nix-update-script, }: rustPlatform.buildRustPackage rec { pname = "notmuch-mailmover"; @@ -29,12 +31,17 @@ rustPlatform.buildRustPackage rec { --zsh share/_notmuch-mailmover ''; + passthru.updateScript = nix-update-script { }; + meta = with lib; { description = "Application to assign notmuch tagged mails to IMAP folders"; mainProgram = "notmuch-mailmover"; homepage = "https://github.com/michaeladler/notmuch-mailmover/"; license = licenses.asl20; - maintainers = with maintainers; [ michaeladler archer-65 ]; + maintainers = with maintainers; [ + michaeladler + archer-65 + ]; platforms = platforms.all; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index fff5e8a232b1..70aa238415da 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -31656,7 +31656,6 @@ with pkgs; pythonPackages = python3Packages; }; - notmuch-mailmover = callPackage ../applications/networking/mailreaders/notmuch/notmuch-mailmover.nix { }; notmuch-mutt = callPackage ../applications/networking/mailreaders/notmuch/mutt.nix { }; From be2e87f600d37da727538d9c609276ef8bc3f1ad Mon Sep 17 00:00:00 2001 From: Michael Adler Date: Mon, 7 Oct 2024 11:35:23 +0200 Subject: [PATCH 2/2] notmuch-mailmover: 0.3.0 -> 0.4.0 --- pkgs/by-name/no/notmuch-mailmover/package.nix | 22 ++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/pkgs/by-name/no/notmuch-mailmover/package.nix b/pkgs/by-name/no/notmuch-mailmover/package.nix index cccb07af7796..6d7c1120cdc5 100644 --- a/pkgs/by-name/no/notmuch-mailmover/package.nix +++ b/pkgs/by-name/no/notmuch-mailmover/package.nix @@ -3,28 +3,40 @@ lib, fetchFromGitHub, rustPlatform, + pkg-config, + lua5_4, installShellFiles, nix-update-script, }: rustPlatform.buildRustPackage rec { pname = "notmuch-mailmover"; - version = "0.3.0"; + version = "0.4.0"; src = fetchFromGitHub { owner = "michaeladler"; repo = pname; rev = "v${version}"; - hash = "sha256-b+6vQ7m49+9RQ+GA75VgOAJej/2zeu5JAje/OazsEsk="; + hash = "sha256-MqDmojVkSPNhpls+O5CrFuo2b7lfFfg1cLDg5PjCF7U="; }; - cargoHash = "sha256-qHSmfR5iUBXq8OQJkGCVA4JnExXisN2OIAVKiVMUaZo="; + cargoHash = "sha256-xFnA6f0X5BAmZEDwR4/hKwIKTr5yNK+CJbo3/o5MmoI="; - nativeBuildInputs = [ installShellFiles ]; + nativeBuildInputs = [ + installShellFiles + pkg-config + ]; - buildInputs = [ notmuch ]; + buildInputs = [ + notmuch + lua5_4 + ]; postInstall = '' installManPage share/notmuch-mailmover.1.gz + + mkdir -p $out/share/notmuch-mailmover + cp -dR example $out/share/notmuch-mailmover/ + installShellCompletion --cmd notmuch-mailmover \ --bash share/notmuch-mailmover.bash \ --fish share/notmuch-mailmover.fish \