-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1322 from eikek/nix-build
Provide nix build from source
- Loading branch information
Showing
28 changed files
with
861 additions
and
2,861 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 |
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 |
---|---|---|
|
@@ -4,4 +4,5 @@ local/ | |
elm-stuff/ | ||
result | ||
*.qcow2 | ||
node_modules/ | ||
node_modules/ | ||
.direnv/ |
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
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 |
---|---|---|
@@ -1,27 +1,77 @@ | ||
{ | ||
description = "Sharry allows to share files with others in a simple way"; | ||
|
||
inputs.flake-utils.url = "github:numtide/flake-utils"; | ||
|
||
outputs = { self, nixpkgs, flake-utils }: | ||
let | ||
release = import nix/release.nix; | ||
in | ||
{ | ||
overlays.default = final: prev: { | ||
sharryVersions = builtins.mapAttrs (_: cfg: final.callPackage (release.pkg cfg) { }) release.cfg; | ||
sharry = final.callPackage release.currentPkg { }; | ||
}; | ||
nixosModules.default = release.module; | ||
} // flake-utils.lib.eachDefaultSystem (system: | ||
let | ||
pkgs = import nixpkgs { inherit system; overlays = [ self.overlays.default ]; }; | ||
in | ||
inputs = { | ||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11"; | ||
flake-utils.url = "github:numtide/flake-utils"; | ||
sbt.url = "github:zaninime/sbt-derivation"; | ||
}; | ||
|
||
outputs = inputs@{ self, nixpkgs, flake-utils, sbt }: | ||
{ | ||
packages = { | ||
inherit (pkgs) sharry; | ||
default = self.packages."${system}".sharry; | ||
} // pkgs.sharryVersions; | ||
} | ||
); | ||
overlays.default = final: prev: { | ||
sharry = import ./nix/package.nix { | ||
inherit (final) pkgs; | ||
inherit sbt; | ||
lib = final.pkgs.lib; | ||
}; | ||
sharry-bin = prev.pkgs.callPackage (import ./nix/package-bin.nix) { }; | ||
}; | ||
nixosModules.default = import ./nix/module.nix; | ||
|
||
nixosConfigurations.test-vm = | ||
let | ||
system = "x86_64-linux"; | ||
pkgs = import inputs.nixpkgs { | ||
inherit system; | ||
overlays = [ self.overlays.default ]; | ||
}; | ||
|
||
in | ||
nixpkgs.lib.nixosSystem { | ||
inherit pkgs system; | ||
specialArgs = inputs; | ||
modules = [ | ||
self.nixosModules.default | ||
./nix/configuration-test.nix | ||
]; | ||
}; | ||
} // flake-utils.lib.eachDefaultSystem (system: | ||
let | ||
pkgs = import nixpkgs { inherit system; overlays = [ self.overlays.default ]; }; | ||
in | ||
{ | ||
packages = { | ||
inherit (pkgs) sharry sharry-bin; | ||
default = self.packages."${system}".sharry; | ||
}; | ||
|
||
formatter = pkgs.nixpkgs-fmt; | ||
|
||
devShells.default = | ||
let | ||
run-jekyll = pkgs.writeScriptBin "jekyll-sharry" '' | ||
jekyll serve -s modules/microsite/target/site --baseurl /sharry | ||
''; | ||
in | ||
pkgs.mkShell { | ||
buildInputs = with pkgs; [ | ||
pkgs.sbt | ||
|
||
# frontend | ||
tailwindcss | ||
elmPackages.elm | ||
|
||
# for debian packages | ||
dpkg | ||
fakeroot | ||
|
||
# microsite | ||
jekyll | ||
nodejs_18 | ||
run-jekyll | ||
]; | ||
}; | ||
} | ||
); | ||
} |
Oops, something went wrong.