depot/third_party/nixpkgs/pkgs/by-name/ru/ruapu/package.nix
Default email 587713944a Project import generated by Copybara.
GitOrigin-RevId: 6143fc5eeb9c4f00163267708e26191d1e918932
2024-04-21 17:54:59 +02:00

42 lines
818 B
Nix

{ 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;
};
})