blob: cae2203d72454da75c8982ffc8750b446c2e97ae (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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;
};
})
|