about summary refs log tree commit diff
path: root/pkgs/applications/editors/cpeditor
diff options
context:
space:
mode:
authorrewine <lhongxu@outlook.com>2021-12-03 01:38:14 +0800
committerrewine <lhongxu@outlook.com>2021-12-07 22:07:21 +0800
commit4251a340e0c4ba0b1126a15bd3dfd62d228c9fec (patch)
treeeb332bb436b2265f72777767e232ac99c556d7bb /pkgs/applications/editors/cpeditor
parent80c7745b4e8fae6e533475208fe947b0bcae3cdf (diff)
downloadnixlib-4251a340e0c4ba0b1126a15bd3dfd62d228c9fec.tar
nixlib-4251a340e0c4ba0b1126a15bd3dfd62d228c9fec.tar.gz
nixlib-4251a340e0c4ba0b1126a15bd3dfd62d228c9fec.tar.bz2
nixlib-4251a340e0c4ba0b1126a15bd3dfd62d228c9fec.tar.lz
nixlib-4251a340e0c4ba0b1126a15bd3dfd62d228c9fec.tar.xz
nixlib-4251a340e0c4ba0b1126a15bd3dfd62d228c9fec.tar.zst
nixlib-4251a340e0c4ba0b1126a15bd3dfd62d228c9fec.zip
cpeditor: init at 6.10.1
Diffstat (limited to 'pkgs/applications/editors/cpeditor')
-rw-r--r--pkgs/applications/editors/cpeditor/default.nix40
1 files changed, 40 insertions, 0 deletions
diff --git a/pkgs/applications/editors/cpeditor/default.nix b/pkgs/applications/editors/cpeditor/default.nix
new file mode 100644
index 000000000000..74394418fd53
--- /dev/null
+++ b/pkgs/applications/editors/cpeditor/default.nix
@@ -0,0 +1,40 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, pkg-config
+, qtbase
+, qttools
+, wrapQtAppsHook
+, cmake
+, ninja
+, python3
+, runtimeShell
+}:
+
+stdenv.mkDerivation rec {
+  pname = "cpeditor";
+  version = "6.10.1";
+
+  src = fetchFromGitHub {
+    owner = "cpeditor";
+    repo = "cpeditor";
+    rev = version;
+    sha256 = "sha256-SIREoOapaZTLtqi0Z07lKmNqF9a9qIpgGxuhqaY3yfU=";
+    fetchSubmodules = true;
+  };
+
+  nativeBuildInputs = [ cmake ninja pkg-config wrapQtAppsHook python3 ];
+  buildInputs = [ qtbase qttools ];
+
+  postPatch = ''
+    substituteInPlace src/Core/Runner.cpp --replace "/bin/bash" "${runtimeShell}"
+  '';
+
+  meta = with lib; {
+    description = "An IDE specially designed for competitive programming";
+    homepage = "https://cpeditor.org";
+    license = licenses.gpl3Plus;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ rewine ];
+  };
+}