aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nix/lib/overlays.nix6
-rw-r--r--nix/users/fcuny/darwin.nix2
-rw-r--r--overlays/default.nix1
-rw-r--r--packages/sapi/default.nix28
4 files changed, 37 insertions, 0 deletions
diff --git a/nix/lib/overlays.nix b/nix/lib/overlays.nix
new file mode 100644
index 0000000..1ec6f49
--- /dev/null
+++ b/nix/lib/overlays.nix
@@ -0,0 +1,6 @@
+let path = ../../overlays;
+in with builtins;
+map (n: import (path + ("/" + n))) (filter
+ (n:
+ match ".*\\.nix" n != null || pathExists (path + ("/" + n + "/default.nix")))
+ (attrNames (readDir path)))
diff --git a/nix/users/fcuny/darwin.nix b/nix/users/fcuny/darwin.nix
index b56a67d..b882bc5 100644
--- a/nix/users/fcuny/darwin.nix
+++ b/nix/users/fcuny/darwin.nix
@@ -1,4 +1,6 @@
{ pkgs, ... }: {
+ nixpkgs.overlays = import ../../../nix/lib/overlays.nix;
+
# The user should already exist, but we need to set this up so Nix knows
# what our home directory is (https://github.com/LnL7/nix-darwin/issues/423).
users.users.fcuny = {
diff --git a/overlays/default.nix b/overlays/default.nix
new file mode 100644
index 0000000..305e8de
--- /dev/null
+++ b/overlays/default.nix
@@ -0,0 +1 @@
+final: _: { sapi = final.callPackage ../packages/sapi { }; }
diff --git a/packages/sapi/default.nix b/packages/sapi/default.nix
new file mode 100644
index 0000000..66df5c0
--- /dev/null
+++ b/packages/sapi/default.nix
@@ -0,0 +1,28 @@
+{ stdenv, fetchurl, lib, ... }:
+
+stdenv.mkDerivation rec {
+ pname = "sapi";
+ version = "1.2.4";
+ src = fetchurl {
+ url =
+ "https://artifactory.rbx.com:443/artifactory/generic-rbx-local/sapi-cli/darwin-amd64/v${version}/sapi";
+ sha256 = "sha256-Il/aqGzxtI84TdUAz4Fvw8RbAgGBZQPN3MZrOitrpVk=";
+ };
+
+ installPhase = ''
+ mkdir -p $out/bin
+ cp $src $out/bin/sapi
+ chmod +x $out/bin/sapi
+ '';
+
+ dontUnpack = true;
+ dontStrip = true;
+
+ meta = with lib; {
+ description = "sapi command-line tool";
+ homepage = "https://go/sapi";
+ license = licenses.unfree;
+ platforms = [ "x86_64-darwin" ];
+ };
+}
+