Skip to content

Commit

Permalink
use flake utils
Browse files Browse the repository at this point in the history
  • Loading branch information
nekronos committed Oct 2, 2024
1 parent ab0b99b commit 01c7047
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 34 deletions.
22 changes: 20 additions & 2 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

53 changes: 21 additions & 32 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,59 +5,48 @@
url = "github:edolstra/flake-compat";
flake = false;
};
systems.url = "github:nix-systems/default";
flake-utils.url = "github:numtide/flake-utils";
};

outputs =
{
self,
nixpkgs,
systems,
flake-utils,
...
}:
let
lastModifiedDate = self.lastModifiedDate or self.lastModified or "19700101";
version = builtins.substring 0 8 lastModifiedDate;
eachSystem = nixpkgs.lib.genAttrs (import systems);
nixpkgsFor = eachSystem (system: import nixpkgs { inherit system; });
in
rec {
packages = eachSystem (
system:
let
pkgs = nixpkgsFor.${system};
in
{
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = import nixpkgs { inherit system; };
lastModifiedDate = self.lastModifiedDate or self.lastModified or "19700101";
version = builtins.substring 0 8 lastModifiedDate;
in
rec {
packages = {
default = pkgs.buildDotnetModule {
pname = "ResultSharp";
# inherit version;
version = "3.0.0";

src = ./.;
nugetDeps = ./deps.nix;
dotnet-sdk = pkgs.dotnet-sdk_8;
dotnet-runtime = pkgs.dotnet-runtime_8;
projectFile = "ResultSharp.sln";
packNupkg = true;
projectFile = "ResultSharp/ResultSharp.csproj";
testProjectFile = "ResultSharp.Tests/ResultSharp.Tests.csproj";
doCheck = true;
# packNupkg = true;
};
}
);
devShells = eachSystem (
system:
let
pkgs = nixpkgsFor.${system};
defaultPackage = packages.${system}.default;
in
{
};
devShells = {
default = pkgs.mkShell {
packages =
with pkgs;
[
omnisharp-roslyn
]
++ defaultPackage.nativeBuildInputs;
++ packages.default.nativeBuildInputs;
};
}
);
};
};
}
);
}

0 comments on commit 01c7047

Please sign in to comment.