nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 86 lines 1.4 kB view raw
1{ 2 lib, 3 stdenv, 4 nixosTests, 5 fetchFromGitHub, 6 cmake, 7 asciidoc, 8 pkg-config, 9 db, 10 curl, 11 jemalloc, 12 boost186, 13 fmt, 14 fuse3, 15 spdlog, 16 yaml-cpp, 17 isa-l, 18 judy, 19 prometheus-cpp, 20 libz, 21}: 22 23stdenv.mkDerivation (finalAttrs: { 24 pname = "saunafs"; 25 version = "4.11.0"; 26 27 src = fetchFromGitHub { 28 owner = "leil-io"; 29 repo = "saunafs"; 30 rev = "v${finalAttrs.version}"; 31 hash = "sha256-ZQ0+jiVpHZhAOdYneKkPi3M45LU9xj2FBbqo6VcD0JY="; 32 }; 33 34 patches = [ 35 ./sfstool.patch 36 ]; 37 38 outputs = [ 39 "out" 40 "man" 41 "dev" 42 ]; 43 44 nativeBuildInputs = [ 45 cmake 46 asciidoc 47 pkg-config 48 ]; 49 buildInputs = [ 50 db 51 curl 52 fmt 53 spdlog 54 yaml-cpp 55 fuse3 56 boost186 57 jemalloc 58 isa-l 59 judy 60 prometheus-cpp 61 libz 62 ]; 63 64 cmakeFlags = [ 65 (lib.cmakeBool "ENABLE_WERROR" false) 66 (lib.cmakeBool "ENABLE_DOC" false) 67 (lib.cmakeBool "ENABLE_CLIENT_LIB" true) 68 (lib.cmakeBool "ENABLE_JEMALLOC" true) 69 ]; 70 71 postInstall = lib.optionalString (!stdenv.hostPlatform.isStatic) '' 72 rm $out/lib/*.a 73 74 ln -s $out/bin/sfsmount $out/bin/mount.saunafs 75 ''; 76 77 passthru.tests = nixosTests.saunafs; 78 79 meta = with lib; { 80 description = "Distributed POSIX file system"; 81 homepage = "https://saunafs.com"; 82 platforms = platforms.linux; 83 license = licenses.gpl3Only; 84 maintainers = [ maintainers.markuskowa ]; 85 }; 86})