mirror of
https://github.com/sbrow/zomq.git
synced 2026-08-26 10:53:32 -04:00
build: Added nix build for the library.
This commit is contained in:
+3
-2
@@ -1,4 +1,5 @@
|
|||||||
.direnv
|
.direnv
|
||||||
node_modules
|
result
|
||||||
vendor
|
zomq.a
|
||||||
|
zomq.so
|
||||||
zmq_odin
|
zmq_odin
|
||||||
|
|||||||
@@ -27,7 +27,45 @@
|
|||||||
systems = [ "x86_64-linux" ];
|
systems = [ "x86_64-linux" ];
|
||||||
|
|
||||||
perSystem =
|
perSystem =
|
||||||
{ pkgs, system, inputs', ... }: {
|
{ pkgs, system, inputs', ... }:
|
||||||
|
let
|
||||||
|
zomq = pkgs.stdenv.mkDerivation {
|
||||||
|
pname = "zomq";
|
||||||
|
version = "0.1.0";
|
||||||
|
src = ./.;
|
||||||
|
|
||||||
|
nativeBuildInputs = [ pkgs.odin ];
|
||||||
|
buildInputs = [ pkgs.zeromq ];
|
||||||
|
|
||||||
|
dontConfigure = true;
|
||||||
|
doCheck = true;
|
||||||
|
|
||||||
|
buildPhase = ''
|
||||||
|
runHook preBuild
|
||||||
|
odin build . -build-mode:lib -o:speed -out:libzomq
|
||||||
|
runHook postBuild
|
||||||
|
'';
|
||||||
|
|
||||||
|
checkPhase = ''
|
||||||
|
runHook preCheck
|
||||||
|
odin test . -all-packages
|
||||||
|
runHook postCheck
|
||||||
|
'';
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
install -Dm644 libzomq.a $out/lib/libzomq.a
|
||||||
|
runHook postInstall
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "libzmq bindings for odin";
|
||||||
|
platforms = [ "x86_64-linux" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
in {
|
||||||
|
packages.default = zomq;
|
||||||
|
|
||||||
_module.args.pkgs = import nixpkgs {
|
_module.args.pkgs = import nixpkgs {
|
||||||
inherit system;
|
inherit system;
|
||||||
config.allowUnfree = true;
|
config.allowUnfree = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user