Skip to content

Commit

Permalink
chore: Edit mkBinaryInstall
Browse files Browse the repository at this point in the history
  • Loading branch information
haruki7049 committed Jul 1, 2024
1 parent 79e5f6e commit a5a100c
Showing 1 changed file with 6 additions and 14 deletions.
20 changes: 6 additions & 14 deletions default.nix
Original file line number Diff line number Diff line change
@@ -1,23 +1,15 @@
self: super:
let
inherit (super.stdenv.hostPlatform) system;
lib = super.lib;
fetchurl = super.fetchurl;
rpath = super.lib.makeLibraryPath [ super.pkgs.gcc-unwrapped ];
mkBinaryInstall = { pname ? "surrealdb", version, url, sha256 }:
super.stdenv.mkDerivation rec {
inherit pname version;

src = {
x86_64-linux = super.fetchurl {
url =
"https://github.com/surrealdb/surrealdb/releases/download/v${version}/surreal-v${version}.linux-amd64.tgz";
hash = "sha256-JaHfiAZFgKP5RS0GCQBakYKHPnIqOtds1J65yTznGoI=";
};
aarch64-linux = super.fetchurl {
url =
"https://github.com/surrealdb/surrealdb/releases/download/v${version}/surreal-v${version}.linux-arm64.tgz";
hash = "sha256-hlMtgEaonW41TTd2Ilrx3oXY5mdnZjfccPmg4x/6qnU=";
};
}.${system};
src = fetchurl {
inherit url sha256;
};

sourceRoot = ".";

Expand All @@ -35,7 +27,7 @@ let
patchelf --set-rpath ${rpath} "$out/bin/surreal" || true
'';

meta = with super.lib; {
meta = with lib; {
description =
"A scalable, distributed, collaborative, document-graph database, for the realtime web";
homepage = "https://surrealdb.com/";
Expand Down

0 comments on commit a5a100c

Please sign in to comment.