style: Apply nixfmt to trivial Nix files
ALl the ones except for build-image.nix are considered trivial. On the latter, nixfmt makes some useful changes but by-and-large it is not ready for that code yet.
This commit is contained in:
parent
6285cd8dbf
commit
3939722063
5 changed files with 21 additions and 27 deletions
|
@ -1,12 +1,10 @@
|
||||||
# This file was generated by https://github.com/kamilchm/go2nix v1.3.0
|
# This file was generated by https://github.com/kamilchm/go2nix v1.3.0
|
||||||
[
|
[{
|
||||||
{
|
goPackagePath = "gonum.org/v1/gonum";
|
||||||
goPackagePath = "gonum.org/v1/gonum";
|
fetch = {
|
||||||
fetch = {
|
type = "git";
|
||||||
type = "git";
|
url = "https://github.com/gonum/gonum";
|
||||||
url = "https://github.com/gonum/gonum";
|
rev = "ced62fe5104b907b6c16cb7e575c17b2e62ceddd";
|
||||||
rev = "ced62fe5104b907b6c16cb7e575c17b2e62ceddd";
|
sha256 = "1b7q6haabnp53igpmvr6a2414yralhbrldixx4kbxxg1apy8jdjg";
|
||||||
sha256 = "1b7q6haabnp53igpmvr6a2414yralhbrldixx4kbxxg1apy8jdjg";
|
};
|
||||||
};
|
}]
|
||||||
}
|
|
||||||
]
|
|
||||||
|
|
|
@ -11,8 +11,7 @@
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
{ pkgs ? import <nixpkgs> {}
|
{ pkgs ? import <nixpkgs> { }, preLaunch ? "" }:
|
||||||
, preLaunch ? "" }:
|
|
||||||
|
|
||||||
with pkgs;
|
with pkgs;
|
||||||
|
|
||||||
|
@ -23,7 +22,7 @@ rec {
|
||||||
# Users will usually not want to use this directly, instead see the
|
# Users will usually not want to use this directly, instead see the
|
||||||
# 'nixery' derivation below, which automatically includes runtime
|
# 'nixery' derivation below, which automatically includes runtime
|
||||||
# data dependencies.
|
# data dependencies.
|
||||||
nixery-server = callPackage ./server {};
|
nixery-server = callPackage ./server { };
|
||||||
|
|
||||||
# Implementation of the image building & layering logic
|
# Implementation of the image building & layering logic
|
||||||
nixery-build-image = (import ./build-image { inherit pkgs; }).wrapper;
|
nixery-build-image = (import ./build-image { inherit pkgs; }).wrapper;
|
||||||
|
@ -31,7 +30,7 @@ rec {
|
||||||
# Use mdBook to build a static asset page which Nixery can then
|
# Use mdBook to build a static asset page which Nixery can then
|
||||||
# serve. This is primarily used for the public instance at
|
# serve. This is primarily used for the public instance at
|
||||||
# nixery.dev.
|
# nixery.dev.
|
||||||
nixery-book = callPackage ./docs {};
|
nixery-book = callPackage ./docs { };
|
||||||
|
|
||||||
# Wrapper script running the Nixery server with the above two data
|
# Wrapper script running the Nixery server with the above two data
|
||||||
# dependencies configured.
|
# dependencies configured.
|
||||||
|
@ -76,7 +75,7 @@ rec {
|
||||||
'';
|
'';
|
||||||
in dockerTools.buildLayeredImage {
|
in dockerTools.buildLayeredImage {
|
||||||
name = "nixery";
|
name = "nixery";
|
||||||
config.Cmd = ["${nixery-launch-script}/bin/nixery"];
|
config.Cmd = [ "${nixery-launch-script}/bin/nixery" ];
|
||||||
maxLayers = 96;
|
maxLayers = 96;
|
||||||
contents = [
|
contents = [
|
||||||
cacert
|
cacert
|
||||||
|
|
|
@ -40,12 +40,12 @@ let
|
||||||
};
|
};
|
||||||
|
|
||||||
nix-1p = fetchFromGitHub {
|
nix-1p = fetchFromGitHub {
|
||||||
owner = "tazjin";
|
owner = "tazjin";
|
||||||
repo = "nix-1p";
|
repo = "nix-1p";
|
||||||
rev = "3cd0f7d7b4f487d04a3f1e3ca8f2eb1ab958c49b";
|
rev = "3cd0f7d7b4f487d04a3f1e3ca8f2eb1ab958c49b";
|
||||||
sha256 = "02lpda03q580gyspkbmlgnb2cbm66rrcgqsv99aihpbwyjym81af";
|
sha256 = "02lpda03q580gyspkbmlgnb2cbm66rrcgqsv99aihpbwyjym81af";
|
||||||
};
|
};
|
||||||
in runCommand "nixery-book" {} ''
|
in runCommand "nixery-book" { } ''
|
||||||
mkdir -p $out
|
mkdir -p $out
|
||||||
cp -r ${./.}/* .
|
cp -r ${./.}/* .
|
||||||
chmod -R a+w src
|
chmod -R a+w src
|
||||||
|
|
|
@ -15,9 +15,9 @@
|
||||||
{ buildGoPackage, lib }:
|
{ buildGoPackage, lib }:
|
||||||
|
|
||||||
buildGoPackage {
|
buildGoPackage {
|
||||||
name = "nixery-server";
|
name = "nixery-server";
|
||||||
goDeps = ./go-deps.nix;
|
goDeps = ./go-deps.nix;
|
||||||
src = ./.;
|
src = ./.;
|
||||||
|
|
||||||
goPackagePath = "github.com/google/nixery";
|
goPackagePath = "github.com/google/nixery";
|
||||||
|
|
||||||
|
|
|
@ -14,14 +14,11 @@
|
||||||
|
|
||||||
# Configures a shell environment that builds required local packages to
|
# Configures a shell environment that builds required local packages to
|
||||||
# run Nixery.
|
# run Nixery.
|
||||||
{pkgs ? import <nixpkgs> {} }:
|
{ pkgs ? import <nixpkgs> { } }:
|
||||||
|
|
||||||
let nixery = import ./default.nix { inherit pkgs; };
|
let nixery = import ./default.nix { inherit pkgs; };
|
||||||
in pkgs.stdenv.mkDerivation {
|
in pkgs.stdenv.mkDerivation {
|
||||||
name = "nixery-dev-shell";
|
name = "nixery-dev-shell";
|
||||||
|
|
||||||
buildInputs = with pkgs;[
|
buildInputs = with pkgs; [ jq nixery.nixery-build-image ];
|
||||||
jq
|
|
||||||
nixery.nixery-build-image
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue