diff --git a/pkgs/by-name/ru/ruri/cmake-install.patch b/pkgs/by-name/ru/ruri/cmake-install.patch new file mode 100644 index 000000000000..668a594d7be5 --- /dev/null +++ b/pkgs/by-name/ru/ruri/cmake-install.patch @@ -0,0 +1,20 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -201,7 +201,7 @@ + set(CMAKE_POSITION_INDEPENDENT_CODE ON) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC") + add_library(ruri SHARED ${SOURCES}) +- install (TARGETS ruri DESTINATION /usr/lib/) ++ install (TARGETS ruri) + else () + # add the executable + set(CMAKE_POSITION_INDEPENDENT_CODE OFF) +@@ -215,7 +215,7 @@ + VERBATIM + ) + endif() +- install (TARGETS ruri DESTINATION /usr/bin/) ++ install (TARGETS ruri) + endif() + + add_custom_target( diff --git a/pkgs/by-name/ru/ruri/package.nix b/pkgs/by-name/ru/ruri/package.nix index ed39092e3688..c7a5a63cbf1e 100644 --- a/pkgs/by-name/ru/ruri/package.nix +++ b/pkgs/by-name/ru/ruri/package.nix @@ -4,36 +4,38 @@ fetchFromGitHub, libcap, libseccomp, + cmake, }: stdenv.mkDerivation (finalAttrs: { pname = "ruri"; - version = "3.8"; + version = "3.9.1"; src = fetchFromGitHub { - owner = "Moe-hacker"; + owner = "RuriOSS"; repo = "ruri"; - rev = "v${finalAttrs.version}"; - fetchSubmodules = false; - sha256 = "sha256-gf+WJPGeLbMntBk8ryTSsV9L4J3N4Goh9eWBIBj5FA4="; + tag = "v${finalAttrs.version}"; + hash = "sha256-stM4hSLdSqmYUZ/XBD3Y1GylrrGRISlcy8LN07HREpQ="; }; + patches = [ + ./cmake-install.patch + ]; + buildInputs = [ libcap libseccomp ]; - installPhase = '' - runHook preInstall - install -Dm755 ruri $out/bin/ruri - runHook postInstall - ''; + nativeBuildInputs = [ + cmake + ]; meta = { description = "Self-contained Linux container implementation"; homepage = "https://wiki.crack.moe/ruri"; downloadPage = "https://github.com/Moe-hacker/ruri"; - changelog = "https://github.com/Moe-hacker/ruri/releases/tag/v${finalAttrs.version}"; + changelog = "https://github.com/Moe-hacker/ruri/releases/tag/${finalAttrs.src.tag}"; mainProgram = "ruri"; license = lib.licenses.mit; platforms = lib.platforms.linux;