Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 54 lines 1.1 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 pkg-config, 6 qtbase, 7 qttools, 8 wrapQtAppsHook, 9 syntax-highlighting, 10 cmake, 11 ninja, 12 python3, 13 runtimeShell, 14}: 15 16stdenv.mkDerivation rec { 17 pname = "cpeditor"; 18 version = "7.0.1"; 19 20 src = fetchFromGitHub { 21 owner = "cpeditor"; 22 repo = "cpeditor"; 23 rev = version; 24 hash = "sha256-t7nn3sO45dOQq5OMWhaseO9XHicQ/1fjukXal5yPMgY"; 25 fetchSubmodules = true; 26 }; 27 28 nativeBuildInputs = [ 29 cmake 30 ninja 31 pkg-config 32 wrapQtAppsHook 33 python3 34 ]; 35 buildInputs = [ 36 qtbase 37 qttools 38 syntax-highlighting 39 ]; 40 41 postPatch = '' 42 substituteInPlace src/Core/Runner.cpp --replace-fail "/bin/bash" "${runtimeShell}" 43 substituteInPlace dist/linux/cpeditor.desktop --replace-fail 'Exec=/usr/bin/cpeditor' "Exec=cpeditor" 44 ''; 45 46 meta = with lib; { 47 description = "IDE specially designed for competitive programming"; 48 homepage = "https://cpeditor.org"; 49 license = licenses.gpl3Plus; 50 platforms = platforms.linux; 51 maintainers = with maintainers; [ rewine ]; 52 mainProgram = "cpeditor"; 53 }; 54}