File tree Expand file tree Collapse file tree 2 files changed +22
-9
lines changed
Expand file tree Collapse file tree 2 files changed +22
-9
lines changed Original file line number Diff line number Diff line change 1- let pkgs = ( import ( fetchTarball "https://github.com/NixOS/nixpkgs/archive/57be0c5d9650a5c3970439ba7a1f4a017cd98cc0.tar.gz" ) {
2- overlays = [
3- ( import ( builtins . fetchTarball "https://github.com/oxalica/rust-overlay/archive/master.tar.gz" ) )
4- ] ;
5- } ) ;
1+ let
2+ pkgs = ( import ( fetchTarball "https://github.com/NixOS/nixpkgs/archive/57be0c5d9650a5c3970439ba7a1f4a017cd98cc0.tar.gz" ) {
3+ overlays = [
4+ ( import ( builtins . fetchTarball "https://github.com/oxalica/rust-overlay/archive/master.tar.gz" ) )
5+ ] ;
6+ } ) ;
7+ luoguGcc = import ./gcc-luogu { inherit pkgs ; } ;
68in with pkgs ; {
79 # Basic utils
810 inherit coreutils ;
@@ -14,7 +16,8 @@ in with pkgs; {
1416 inherit gzip ;
1517
1618 # C, C++
17- gcc = ( callPackage ./gcc-luogu { inherit pkgs ; } ) . gcc ;
19+ gcc = luoguGcc . gcc ;
20+ # gcc9 = luoguGcc.gcc9; # NOI/NOIP uses GCC 9.3.0
1821
1922 # Rust
2023 rust = rust-bin . nightly . "2021-11-22" . default ;
Original file line number Diff line number Diff line change 11{ pkgs ? import <nixpkgs> { } } : with pkgs ;
22let
33 pname = "luogu-gcc" ;
4- sourceCC = gcc11 . cc ;
5-
6- cc = sourceCC . overrideAttrs ( a : with a ; {
4+
5+ cc = gcc11 . cc . overrideAttrs ( a : with a ; {
76 inherit pname ;
87 patches = patches ++ [
98 ./disable-pragma-and-attribute-for-optimize.patch
109 ] ;
1110 } ) ;
1211 gcc = wrapCC ( cc ) ;
12+
13+ cc9 = pkgs . gcc9 . cc . overrideAttrs ( a : with a ; {
14+ inherit pname ;
15+ patches = patches ++ [
16+ ./disable-pragma-and-attribute-for-optimize.patch
17+ ] ;
18+ } ) ;
19+ gcc9 = wrapCC ( cc9 ) ;
1320in {
1421 inherit gcc ;
1522 inherit cc ;
23+
24+ inherit gcc9 ;
25+ inherit cc9 ;
1626}
You can’t perform that action at this time.
0 commit comments