nixpkgs/pkgs/development/libraries/libcs50/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

29 lines
658 B
Nix
Raw Normal View History

2023-05-29 14:02:06 +00:00
{ lib, stdenv, fetchFromGitHub }:
2023-05-29 17:33:44 +00:00
stdenv.mkDerivation (finalAttrs: {
2023-05-29 14:02:06 +00:00
pname = "libcs50";
2024-06-23 01:57:32 +00:00
version = "11.0.3";
2023-05-29 14:02:06 +00:00
src = fetchFromGitHub {
owner = "cs50";
repo = "libcs50";
2023-06-01 15:51:48 +00:00
rev = "v${finalAttrs.version}";
2024-06-23 01:57:32 +00:00
hash = "sha256-G6QayPGR4lkeFuUYsFszekLAzzpA3hhIRmqt/OB0cdY=";
2023-05-29 14:02:06 +00:00
};
installPhase = ''
2023-06-01 15:40:03 +00:00
runHook preInstall
2023-05-29 14:02:06 +00:00
mkdir $out
cp -R build/lib $out/lib
cp -R build/include $out/include
2024-06-23 01:57:32 +00:00
ln -sf $out/lib/libcs50.so.11.0.3 $out/lib/libcs50.so.11
2023-06-01 15:40:03 +00:00
runHook postInstall
2023-05-29 14:02:06 +00:00
'';
meta = with lib; {
homepage = "https://github.com/cs50/libcs50";
description = "CS50 Library for C";
license = licenses.gpl3Only;
};
2023-05-29 17:33:44 +00:00
})