nixpkgs/pkgs/applications/misc/pueue/default.nix
Artturin e0464e4788 treewide: replace stdenv.is with stdenv.hostPlatform.is
In preparation for the deprecation of `stdenv.isX`.

These shorthands are not conducive to cross-compilation because they
hide the platforms.

Darwin might get cross-compilation for which the continued usage of `stdenv.isDarwin` will get in the way

One example of why this is bad and especially affects compiler packages
https://www.github.com/NixOS/nixpkgs/pull/343059

There are too many files to go through manually but a treewide should
get users thinking when they see a `hostPlatform.isX` in a place where it
doesn't make sense.

```
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv.is" "stdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv'.is" "stdenv'.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "clangStdenv.is" "clangStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "gccStdenv.is" "gccStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenvNoCC.is" "stdenvNoCC.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "inherit (stdenv) is" "inherit (stdenv.hostPlatform) is"
fd --type f "\.nix" | xargs sd --fixed-strings "buildStdenv.is" "buildStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "effectiveStdenv.is" "effectiveStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "originalStdenv.is" "originalStdenv.hostPlatform.is"
```
2024-09-25 00:04:37 +03:00

68 lines
1.8 KiB
Nix

{ lib
, stdenv
, fetchFromGitHub
, Libsystem
, SystemConfiguration
, installShellFiles
, libiconv
, rustPlatform
}:
rustPlatform.buildRustPackage rec {
pname = "pueue";
version = "3.4.1";
src = fetchFromGitHub {
owner = "Nukesor";
repo = "pueue";
rev = "v${version}";
hash = "sha256-b4kZ//+rO70uZh1fvI4A2dbCZ7ymci9g/u5keMBWYf8=";
};
cargoHash = "sha256-sTpxcJs5I7LzVw56ka5PlFixJSiJeCae9serS0FhmuA=";
nativeBuildInputs = [
installShellFiles
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
rustPlatform.bindgenHook
];
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
Libsystem
SystemConfiguration
libiconv
];
checkFlags = [
"--test client_tests"
"--skip=test_single_huge_payload"
"--skip=test_create_unix_socket"
];
postInstall = ''
for shell in bash fish zsh; do
$out/bin/pueue completions $shell .
done
installShellCompletion pueue.{bash,fish} _pueue
'';
meta = with lib; {
homepage = "https://github.com/Nukesor/pueue";
description = "Daemon for managing long running shell commands";
longDescription = ''
Pueue is a command-line task management tool for sequential and parallel
execution of long-running tasks.
Simply put, it's a tool that processes a queue of shell commands. On top
of that, there are a lot of convenient features and abstractions.
Since Pueue is not bound to any terminal, you can control your tasks from
any terminal on the same machine. The queue will be continuously
processed, even if you no longer have any active ssh sessions.
'';
changelog = "https://github.com/Nukesor/pueue/blob/v${version}/CHANGELOG.md";
license = licenses.mit;
maintainers = with maintainers; [ sarcasticadmin ];
};
}