Skip to content

Commit

Permalink
piyo
Browse files Browse the repository at this point in the history
  • Loading branch information
haruki7049 committed Oct 20, 2024
1 parent cdd756b commit 24f40f3
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 7 deletions.
16 changes: 14 additions & 2 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,20 @@ in
surrealdb = {
"1.4.2" = mkBinaryInstall {
version = "1.4.2";
url = "https://github.com/surrealdb/surrealdb/releases/download/v1.4.2/surreal-v1.4.2.linux-amd64.tgz";
sha256 = "10hswwyckfcysindffiaf8z8g0lib800j1id8pws70250s4dz895";
srcs = {
x86_64-linux = super.fetchurl {
url = "https://github.com/surrealdb/surrealdb/releases/download/v1.4.2/surreal-v1.4.2.linux-amd64.tgz";
sha256 = "10hswwyckfcysindffiaf8z8g0lib800j1id8pws70250s4dz895";
};
aarch64-linux = super.fetchurl {
url = "https://github.com/surrealdb/surrealdb/releases/download/v1.4.2/surreal-v1.4.2.linux-arm64.tgz";
sha256 = "0xdaz8gy787rf3f3frk7czkdi1fyy5d24xip9lsnx7d88s02slw6";
};
aarch64-darwin = super.fetchurl {
url = "https://github.com/surrealdb/surrealdb/releases/download/v1.4.2/surreal-v1.4.2.darwin-arm64.tgz";
sha256 = "05jib510hg64a2v08z963v3xbcx1k1fdv1m82vr06yhzrdls3fbn";
};
};
};
};
}
13 changes: 8 additions & 5 deletions nix/mkBinaryInstall.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,16 @@
{
pname ? "surrealdb",
version,
url,
sha256,
srcs,
}:
stdenv.mkDerivation {
inherit pname version;

src = fetchurl { inherit url sha256; };
let
src =
srcs.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
in

stdenv.mkDerivation {
inherit pname version src;

sourceRoot = ".";

Expand Down

0 comments on commit 24f40f3

Please sign in to comment.