nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ stdenv, fetchzip }:
2
3stdenv.mkDerivation rec {
4 version = "1.12.0";
5 name = "half-${version}";
6
7 src = fetchzip {
8 url = "mirror://sourceforge/half/${version}/half-${version}.zip";
9 sha256 = "0096xiw8nj86vxnn3lfcl94vk9qbi5i8lnydri9ws358ly6002vc";
10 stripRoot = false;
11 };
12
13 buildCommand = ''
14 mkdir -p $out/include $out/share/doc
15 cp $src/include/half.hpp $out/include/
16 cp $src/{ChangeLog,LICENSE,README}.txt $out/share/doc/
17 '';
18
19 meta = with stdenv.lib; {
20 description = "C++ library for half precision floating point arithmetics";
21 platforms = platforms.all;
22 license = licenses.mit;
23 maintainers = [ maintainers.volth ];
24 };
25}