-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
183 additions
and
0 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 |
---|---|---|
@@ -0,0 +1 @@ | ||
use flake |
Empty file.
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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 |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{ | ||
description = "BasisVR/UpmBuilds repo"; | ||
|
||
inputs = { | ||
flake-utils.url = "github:numtide/flake-utils"; | ||
nixpkgs.url = "github:NixOS/nixpkgs/release-24.11"; | ||
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; | ||
}; | ||
|
||
outputs = inputs-raw@{ flake-utils, ... }: | ||
let | ||
# All systems we may care about evaluating nixpkgs for | ||
systems = with flake-utils.lib.system; [ x86_64-linux aarch64-linux aarch64-darwin x86_64-darwin ]; | ||
perSystem = (system: rec { | ||
inputs = inputs-raw; | ||
pkgs = import inputs.nixpkgs { | ||
inherit system; | ||
overlays = [ | ||
((import nix/overlays/nixpkgs-unstable.nix) { inherit inputs; }) | ||
]; | ||
config = { | ||
# allowUnfree = true; | ||
permittedInsecurePackages = [ | ||
# Needed for roslyn-ls, see | ||
# https://github.com/NixOS/nixpkgs/blob/4989a246/pkgs/by-name/ro/roslyn-ls/package.nix#L21 | ||
"dotnet-sdk-6.0.428" | ||
]; | ||
}; | ||
}; | ||
}); | ||
# This `s` helper variable caches each system we care about in one spot | ||
inherit (flake-utils.lib.eachSystem systems (system: { s = perSystem system; })) s; | ||
in | ||
# System-specific stuff goes in here, by using the flake-utils helper functions | ||
flake-utils.lib.eachSystem systems | ||
(system: | ||
let | ||
inherit (s.${system}) pkgs inputs; | ||
in | ||
{ | ||
formatter = pkgs.nixpkgs-fmt; | ||
devShells = import ./nix/devShells.nix { inherit system pkgs inputs; }; | ||
} | ||
); | ||
} |
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,22 @@ | ||
# Default recipe to run when just is called without arguments | ||
default: build | ||
|
||
# Set the project name | ||
project := "SimpleBase" | ||
|
||
# Clean build outputs | ||
clean: | ||
dotnet clean | ||
rm -rf **/bin **/obj | ||
|
||
# Restore NuGet packages | ||
restore: | ||
dotnet restore | ||
|
||
# Build the project | ||
build: restore | ||
dotnet build --configuration Release | ||
|
||
# Create a new release build | ||
release: clean restore | ||
dotnet publish --configuration Release --output ./publish |
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,26 @@ | ||
# Defines all devShells for the flake | ||
{ system, pkgs, inputs }: | ||
let | ||
dotnet = (with pkgs.dotnetCorePackages; | ||
# Multiple dotnet sdks can be provided here | ||
combinePackages [ | ||
sdk_9_0 | ||
]); | ||
in | ||
{ | ||
default = pkgs.mkShell { | ||
# These programs be available to the dev shell | ||
buildInputs = (with pkgs; [ | ||
dotnet | ||
nixpkgs-fmt | ||
roslyn-ls | ||
just | ||
]) ++ pkgs.lib.optional pkgs.stdenv.isDarwin [ | ||
pkgs.libiconv | ||
]; | ||
|
||
# Hook the shell to set custom env vars | ||
shellHook = '' | ||
''; | ||
}; | ||
} |
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,7 @@ | ||
{ inputs, ... }: | ||
final: _prev: { | ||
unstable = import inputs.nixpkgs-unstable { | ||
system = final.system; | ||
config = final.config; | ||
}; | ||
} |