mirror of
https://github.com/NotAShelf/nyxexprs.git
synced 2025-11-19 12:04:14 +00:00
treewide: start transitioning to nixpkgs package structure
This commit is contained in:
parent
5244163a47
commit
d52fa53348
16 changed files with 190 additions and 63 deletions
47
pkgs/applications/misc/rat/default.nix
Normal file
47
pkgs/applications/misc/rat/default.nix
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
{
|
||||
pins,
|
||||
lib,
|
||||
disableHardening ? true,
|
||||
fetchFromGitHub,
|
||||
stdenv,
|
||||
unixtools,
|
||||
}:
|
||||
assert disableHardening -> lib.warn "nyxpkgs/rat disables hardening to avoid segfaults. You may want to consider overriding the package if this is undesirable" true; let
|
||||
pin = pins.rat;
|
||||
|
||||
pname = "rat";
|
||||
version = "2.0.1";
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
inherit pname version;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
inherit (pin.repository) owner repo;
|
||||
sha256 = pin.hash;
|
||||
rev = pin.revision;
|
||||
};
|
||||
|
||||
# the code is so unsafe, it doesn't work with even one of hardening flags
|
||||
# lol
|
||||
hardeningDisable = lib.optionals disableHardening ["all"];
|
||||
|
||||
buildInputs = [unixtools.xxd];
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
make linux_audio
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
mkdir -p $out/bin
|
||||
install -Dm755 ./bin/rat -t "$out/bin/"
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "rat";
|
||||
homepage = "https://github.com/thinkingsand/rat";
|
||||
maintainers = with lib.maintainers; [NotAShelf];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue