From 4251a340e0c4ba0b1126a15bd3dfd62d228c9fec Mon Sep 17 00:00:00 2001 From: rewine Date: Fri, 3 Dec 2021 01:38:14 +0800 Subject: [PATCH] cpeditor: init at 6.10.1 --- .../applications/editors/cpeditor/default.nix | 40 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 42 insertions(+) create mode 100644 pkgs/applications/editors/cpeditor/default.nix 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 ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b264c9b828fd..3496695afe2c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -24505,6 +24505,8 @@ with pkgs; ffmpeg = ffmpeg-full; }; + cpeditor = libsForQt515.callPackage ../applications/editors/cpeditor { }; + csa = callPackage ../applications/audio/csa { }; csound = callPackage ../applications/audio/csound { };