about summary refs log tree commit diff
path: root/tools/sendsms/default.nix
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2022-09-07 19:09:45 -0700
committerFranck Cuny <franck@fcuny.net>2022-09-07 19:15:30 -0700
commit8d405037f941abaaa2f43b3de1d442bea1b807c6 (patch)
tree3cda30d59f8be9e5a15501d86c377049eacfa896 /tools/sendsms/default.nix
parentfeat(flake): use naersk to build rust projects (diff)
downloadworld-8d405037f941abaaa2f43b3de1d442bea1b807c6.tar.gz
feat(tools/sendsms): build sendsms with nix via naersk
I can now run `nix build .#tools.sendsms` to build the tool, or get it
deployed on a machine.

Change-Id: I82c733be466adb229d98414fd1229e05f355dd7d
Diffstat (limited to 'tools/sendsms/default.nix')
-rw-r--r--tools/sendsms/default.nix15
1 files changed, 15 insertions, 0 deletions
diff --git a/tools/sendsms/default.nix b/tools/sendsms/default.nix
new file mode 100644
index 0000000..6c9b79c
--- /dev/null
+++ b/tools/sendsms/default.nix
@@ -0,0 +1,15 @@
+{ pkgs, naersk, ... }:
+
+naersk.lib."${pkgs.system}".buildPackage {
+  src = builtins.filterSource
+    (path: type:
+      type != "directory" || builtins.baseNameOf path != "target")
+    ./.;
+
+  nativeBuildInputs = with pkgs; [ pkg-config ];
+  buildInputs = with pkgs; [ openssl ];
+
+  remapPathPrefix = true;
+  doCheck = true;
+  copyLibs = true;
+}