-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: John Boehr <[email protected]> Co-authored-by: Rahul Butani <[email protected]>
- Loading branch information
Showing
29 changed files
with
1,231 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
# use flake | ||
use flake |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,4 +22,4 @@ jobs: | |
with: | ||
workdir: nim | ||
with-nim: stable | ||
build-pkgs: libsdl2-dev | ||
build-pkgs: libsdl2-dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../utils/.envrc |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,44 @@ | ||
{ lib | ||
, stdenv | ||
, cmake | ||
, SDL2 | ||
, autoPatchelfHook | ||
, pkg-config | ||
, valgrind ? null | ||
, clang-tools ? null | ||
, nixpkgs-fmt ? null | ||
, ltoSupport ? false | ||
, debugSupport ? false | ||
{ | ||
lib, | ||
stdenv, | ||
cmake, | ||
SDL2, | ||
pkg-config, | ||
cleanSource, | ||
clang-tools ? null, | ||
ltoSupport ? false, | ||
debugSupport ? false | ||
}: | ||
|
||
let | ||
devTools = [ clang-tools nixpkgs-fmt valgrind ]; | ||
devTools = [ clang-tools ]; | ||
in | ||
|
||
stdenv.mkDerivation { | ||
stdenv.mkDerivation rec { | ||
name = "rosettaboy-c"; | ||
|
||
src = ./.; | ||
src = cleanSource { | ||
inherit name; | ||
src = ./.; | ||
extraRules = '' | ||
.clang-format | ||
''; | ||
}; | ||
|
||
passthru = { inherit devTools; }; | ||
|
||
enableParallelBuilding = true; | ||
|
||
buildInputs = [ SDL2 ]; | ||
nativeBuildInputs = [ autoPatchelfHook cmake pkg-config ] | ||
++ lib.optionals debugSupport devTools; | ||
nativeBuildInputs = [ cmake pkg-config ]; | ||
|
||
cmakeFlags = [ ] | ||
++ lib.optional debugSupport "-DCMAKE_BUILD_TYPE=Debug" | ||
++ lib.optional (!debugSupport) "-DCMAKE_BUILD_TYPE=Release" | ||
++ lib.optional ltoSupport "-DENABLE_LTO=On" | ||
; | ||
|
||
meta = with lib; { | ||
description = "rosettaboy-c"; | ||
mainProgram = "rosettaboy-c"; | ||
meta = { | ||
description = name; | ||
mainProgram = name; | ||
}; | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,3 +10,4 @@ CMakeFiles | |
Makefile | ||
cmake_install.cmake | ||
rosettaboy-cpp | ||
/result* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{ | ||
lib, | ||
stdenv, | ||
cmake, | ||
SDL2, | ||
fmt_8, | ||
pkg-config, | ||
cleanSource, | ||
clang-format ? null, | ||
ltoSupport ? false, | ||
debugSupport ? false, | ||
}: | ||
|
||
stdenv.mkDerivation rec { | ||
name = "rosettaboy-cpp"; | ||
src = cleanSource { | ||
inherit name; | ||
src = ./.; | ||
extraRules = '' | ||
.clang-format | ||
''; | ||
}; | ||
|
||
buildInputs = [ SDL2 fmt_8 ]; | ||
nativeBuildInputs = [ cmake pkg-config ]; | ||
|
||
passthru = { | ||
devTools = [ clang-format ]; | ||
}; | ||
|
||
cmakeFlags = [ ] | ||
++ lib.optional debugSupport "-DCMAKE_BUILD_TYPE=Debug" | ||
++ lib.optional (!debugSupport) "-DCMAKE_BUILD_TYPE=Release" | ||
++ lib.optional ltoSupport "-DENABLE_LTO=On" | ||
; | ||
|
||
meta = { | ||
description = name; | ||
mainProgram = name; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
(import | ||
( | ||
let lock = builtins.fromJSON (builtins.readFile ./flake.lock); in | ||
fetchTarball { | ||
url = "https://github.com/edolstra/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz"; | ||
sha256 = lock.nodes.flake-compat.locked.narHash; | ||
} | ||
) | ||
{ src = ./.; } | ||
).defaultNix |
Oops, something went wrong.