nixpkgs/pkgs/applications/editors/cpeditor/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

43 lines
937 B
Nix
Raw Normal View History

2021-12-02 17:38:14 +00:00
{ lib
, stdenv
, fetchFromGitHub
, pkg-config
, qtbase
, qttools
, wrapQtAppsHook
2024-03-10 16:03:50 +00:00
, syntax-highlighting
2021-12-02 17:38:14 +00:00
, cmake
, ninja
, python3
, runtimeShell
}:
stdenv.mkDerivation rec {
pname = "cpeditor";
2024-03-10 16:03:50 +00:00
version = "7.0.1";
2021-12-02 17:38:14 +00:00
src = fetchFromGitHub {
owner = "cpeditor";
repo = "cpeditor";
rev = version;
2024-03-10 16:03:50 +00:00
hash = "sha256-t7nn3sO45dOQq5OMWhaseO9XHicQ/1fjukXal5yPMgY";
2021-12-02 17:38:14 +00:00
fetchSubmodules = true;
};
nativeBuildInputs = [ cmake ninja pkg-config wrapQtAppsHook python3 ];
2024-03-10 16:03:50 +00:00
buildInputs = [ qtbase qttools syntax-highlighting ];
2021-12-02 17:38:14 +00:00
postPatch = ''
2024-03-10 16:03:50 +00:00
substituteInPlace src/Core/Runner.cpp --replace-fail "/bin/bash" "${runtimeShell}"
2021-12-02 17:38:14 +00:00
'';
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 ];
2023-11-27 01:17:53 +00:00
mainProgram = "cpeditor";
2021-12-02 17:38:14 +00:00
};
}