From a0b302d906c45f02d450e6a1636c16d4651f4f15 Mon Sep 17 00:00:00 2001 From: Magic_RB Date: Tue, 13 Jun 2023 23:04:10 +0200 Subject: [PATCH] Add overlay for `ds3os` Signed-off-by: Magic_RB --- flake.nix | 1 + overlays/ds3os.nix | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 overlays/ds3os.nix diff --git a/flake.nix b/flake.nix index 9e2dc04..f003b34 100644 --- a/flake.nix +++ b/flake.nix @@ -59,6 +59,7 @@ overlays/getmail6 overlays/maildrop overlays/courier-unicode.nix + overlays/ds3os.nix ]; flake.nixosModules = { diff --git a/overlays/ds3os.nix b/overlays/ds3os.nix new file mode 100644 index 0000000..aebc552 --- /dev/null +++ b/overlays/ds3os.nix @@ -0,0 +1,34 @@ +{ ... }: +let + pname = "ds3os"; + version = "0.22.0.0"; +in +{ + flake.overlays.ds3os = + final: prev: + { + ds3os = + prev.gcc11Stdenv.mkDerivation { + inherit pname version; + + src = prev.fetchFromGitHub { + owner = "TLeonardUK"; + repo = pname; + rev = "v${version}-main"; + sha256 = "sha256-Rsiyo2tuOsjyl1OtXKbzRlD6d3divJJAdlijXt/RxmA="; + }; + + hardeningDisable = [ "format" ]; + + nativeBuildInputs = with prev; [ cmake ]; + + installPhase = '' + mkdir -p $out/{bin,libexec} + cp -r ../bin/x64_release $out/libexec/. + ln -s $out/libexec/Server $out/bin/ds3os + ''; + + meta.broken = true; + }; + }; +}