about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorSandro <sandro.jaeckel@gmail.com>2021-10-10 18:41:48 +0200
committerGitHub <noreply@github.com>2021-10-10 18:41:48 +0200
commit3814bbc65f10dd4813f4b312a5c4221524c67b15 (patch)
treeab63cf7dd9bc85b9957cbbaa6ffdf1a59748c558 /pkgs
parentf26d465edd0a4a4e06499303883759685a4437db (diff)
parent6b9f8629d2a612bd8a9425542fe2ed1cb214f775 (diff)
Merge pull request #141190 from figsoda/synth
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/tools/misc/synth/default.nix36
-rw-r--r--pkgs/top-level/all-packages.nix4
2 files changed, 40 insertions, 0 deletions
diff --git a/pkgs/tools/misc/synth/default.nix b/pkgs/tools/misc/synth/default.nix
new file mode 100644
index 0000000000000..31d0b6e7d32fb
--- /dev/null
+++ b/pkgs/tools/misc/synth/default.nix
@@ -0,0 +1,36 @@
+{ lib
+, rustPlatform
+, fetchFromGitHub
+, pkg-config
+, openssl
+, stdenv
+, Security
+}:
+
+rustPlatform.buildRustPackage rec {
+  pname = "synth";
+  version = "0.5.6";
+
+  src = fetchFromGitHub {
+    owner = "getsynth";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "06kgzaja04553gaxrfz6d1rqi3xwa6ijl0q6425fg0mqq9ifv7xk";
+  };
+
+  cargoSha256 = "sha256-bjda4uE5K+cJkS2TsTv7FN3H6q3cElRr674FTKaIexA=";
+
+  nativeBuildInputs = [ pkg-config ];
+
+  buildInputs = [ openssl ] ++ lib.optional stdenv.isDarwin Security;
+
+  # requires unstable rust features
+  RUSTC_BOOTSTRAP = 1;
+
+  meta = with lib; {
+    description = "A tool for generating realistic data using a declarative data model";
+    homepage = "https://github.com/getsynth/synth";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ figsoda ];
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 14031daf5a88c..062b36034e749 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -3449,6 +3449,10 @@ with pkgs;
 
   sydbox = callPackage ../os-specific/linux/sydbox { };
 
+  synth = callPackage ../tools/misc/synth {
+    inherit (darwin.apple_sdk.frameworks) Security;
+  };
+
   syscall_limiter = callPackage ../os-specific/linux/syscall_limiter {};
 
   syslogng = callPackage ../tools/system/syslog-ng { };