mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-09-19 22:30:23 +00:00
csol: init at 1.6.0 (#526134)
This commit is contained in:
@@ -10473,6 +10473,12 @@
|
||||
githubId = 104317939;
|
||||
name = "gilice";
|
||||
};
|
||||
gimura = {
|
||||
email = "gimura0001@gmail.com";
|
||||
github = "gimura2022";
|
||||
githubId = 109300813;
|
||||
name = "gimura";
|
||||
};
|
||||
gin66 = {
|
||||
email = "jochen@kiemes.de";
|
||||
github = "gin66";
|
||||
|
||||
52
pkgs/by-name/cs/csol/package.nix
Normal file
52
pkgs/by-name/cs/csol/package.nix
Normal file
@@ -0,0 +1,52 @@
|
||||
{
|
||||
stdenv,
|
||||
lib,
|
||||
cmake,
|
||||
ncurses,
|
||||
fetchFromGitHub,
|
||||
makeWrapper,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "csol";
|
||||
version = "1.6.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "nielssp";
|
||||
repo = "csol";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-EWQL63xE6Z7npXH5ht5KYtQaPrDwuPe2ZhmHrvYIAu8=";
|
||||
};
|
||||
|
||||
__structuredAttrs = true;
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
patches = [ ./replace-etc-path.patch ];
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
makeWrapper
|
||||
];
|
||||
buildInputs = [ ncurses ];
|
||||
|
||||
postFixup = ''
|
||||
wrapProgram $out/bin/csol \
|
||||
--add-flags "-c $out/etc/xdg/csol/csolrc"
|
||||
'';
|
||||
|
||||
cmakeFlags = [
|
||||
"-DCMAKE_POLICY_VERSION_MINIMUM=3.5"
|
||||
];
|
||||
|
||||
hardeningDisable = [ "format" ];
|
||||
|
||||
meta = {
|
||||
description = "A small collection of solitaire/patience games (Klondike, FreeCell, Spider, Yukon, etc.) to play in the terminal";
|
||||
license = lib.licenses.mit;
|
||||
homepage = "https://nielssp.dk/csol";
|
||||
changelog = "https://github.com/nielssp/csol/releases/tag/v${finalAttrs.version}";
|
||||
maintainers = with lib.maintainers; [ gimura ];
|
||||
mainProgram = "csol";
|
||||
};
|
||||
})
|
||||
15
pkgs/by-name/cs/csol/replace-etc-path.patch
Normal file
15
pkgs/by-name/cs/csol/replace-etc-path.patch
Normal file
@@ -0,0 +1,15 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 6c17703..70896f7 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -21,7 +21,7 @@ add_executable(csol ${SRC_LIST} csolrc)
|
||||
target_link_libraries(csol ${CURSES_LIBRARIES})
|
||||
|
||||
install(TARGETS csol DESTINATION bin COMPONENT binaries)
|
||||
-install(FILES "${CMAKE_BINARY_DIR}/csolrc" DESTINATION /etc/xdg/csol COMPONENT config)
|
||||
-install(DIRECTORY "${CMAKE_BINARY_DIR}/themes" DESTINATION /etc/xdg/csol COMPONENT config)
|
||||
-install(DIRECTORY "${CMAKE_BINARY_DIR}/games" DESTINATION /etc/xdg/csol COMPONENT config)
|
||||
+install(FILES "${CMAKE_BINARY_DIR}/csolrc" DESTINATION etc/xdg/csol COMPONENT config)
|
||||
+install(DIRECTORY "${CMAKE_BINARY_DIR}/themes" DESTINATION etc/xdg/csol COMPONENT config)
|
||||
+install(DIRECTORY "${CMAKE_BINARY_DIR}/games" DESTINATION etc/xdg/csol COMPONENT config)
|
||||
install(FILES "${PROJECT_SOURCE_DIR}/doc/csol.6" DESTINATION ${CMAKE_INSTALL_PREFIX}/share/man/man6)
|
||||
Reference in New Issue
Block a user