urbit/nix/nixcrpkgs/pkgs/libusbp/default.nix
benjamin-tlon edd57d380d
Finish cc-release cross-compilation. (#1202)
- Fixes the IPC bug
- Fixes the terminfo bug
- Moves the OSX SDK out of our nixcrpkgs fork.
- Vendor nixcrpkgs instead of having it be a submodule.
2019-04-23 19:50:38 -07:00

44 lines
992 B
Nix

{ crossenv, libudev }:
let
version = "1.1.0";
name = "libusbp-${version}";
src = crossenv.nixpkgs.fetchurl {
url = "https://github.com/pololu/libusbp/archive/${version}.tar.gz";
sha256 = "18l34580ci1pq8p3133dnp8nzlz17qw2796xsz1gn0aca6978izc";
};
lib = crossenv.make_derivation {
inherit version name src;
builder = ./builder.sh;
cross_inputs =
if crossenv.os == "linux" then
[ libudev ]
else
[];
libudev = if crossenv.os == "linux" then libudev else null;
};
examples = crossenv.make_derivation {
name = "${name}-examples";
inherit src version;
builder = ./examples_builder.sh;
cross_inputs = [ lib ];
};
license = crossenv.native.make_derivation {
name = "${name}-license";
inherit src;
builder = ./license_builder.sh;
};
license_set =
(if crossenv.os == "linux" then libudev.license_set else {}) //
{ "${name}" = license; };
in
lib // { inherit examples license_set; }