diff options
author | aleksana <me@aleksana.moe> | 2024-04-14 23:32:41 +0800 |
---|---|---|
committer | aleksana <me@aleksana.moe> | 2024-04-14 23:32:41 +0800 |
commit | af2004e1d4cd76c0c059362db78f804417900af7 (patch) | |
tree | 8129aba16980fe93fe2a85dea8901b9a2065ac60 /pkgs/by-name/ru | |
parent | 7fe12a45e95b5783690b0d4c61365c3875184818 (diff) |
ruapu: init at 0.1.0
Diffstat (limited to 'pkgs/by-name/ru')
-rw-r--r-- | pkgs/by-name/ru/ruapu/package.nix | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/pkgs/by-name/ru/ruapu/package.nix b/pkgs/by-name/ru/ruapu/package.nix new file mode 100644 index 0000000000000..cae2203d72454 --- /dev/null +++ b/pkgs/by-name/ru/ruapu/package.nix @@ -0,0 +1,42 @@ +{ lib +, stdenv +, fetchFromGitHub +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "ruapu"; + version = "0.1.0"; + + src = fetchFromGitHub { + owner = "nihui"; + repo = "ruapu"; + rev = finalAttrs.version; + hash = "sha256-gP2O0KtzArNCU3Sqc7STitO6WkS1536Z4VkA5U1uZuc="; + }; + + buildPhase = '' + runHook preBuild + + $CC main.c -o ruapu + + runHook postBuild + ''; + + installPhase = '' + runHook preInstall + + install -Dm755 ruapu $out/bin/ruapu + install -Dm644 ruapu.h $out/include/ruapu.h + + runHook postInstall + ''; + + meta = { + description = "Detect CPU ISA features with single-file"; + homepage = "https://github.com/nihui/ruapu"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ aleksana ]; + mainProgram = "ruapu"; + platforms = lib.platforms.all; + }; +}) |