diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..e3b9ebf --- /dev/null +++ b/default.nix @@ -0,0 +1,23 @@ +{pkgs ? import {}, ...}: + +let + unilldSrc = builtins.fetchGit { + url = "https://git.emin.engineer/haxala1r/unildd.git"; + ref = "nix"; + }; + unilld = import unilldSrc {inherit pkgs;}; +in +pkgs.buildGoModule { + pname = "objdetect"; + version = ""; + vendorHash = null; # no go dependencies. + + src = pkgs.lib.cleanSource ./.; + + buildInputs = [unilld]; + #CGO_ENABLED = 1; + preBuild = '' +ln -s ${unilld}/lib/ ./lib +ln -s ${unilld}/include/ ./include +''; +}