move all files to new nixfmt rfc

This commit is contained in:
Noah Masur
2024-04-20 09:42:06 -04:00
parent b23efc4d77
commit e43fc0f8db
159 changed files with 5309 additions and 4537 deletions

View File

@ -1,7 +1,8 @@
{
description = "Basic project";
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
outputs = { nixpkgs }:
outputs =
{ nixpkgs }:
let
forAllSystems = nixpkgs.lib.genAttrs [
"x86_64-linux"

View File

@ -8,8 +8,14 @@
inputs.nixpkgs.follows = "haskellNix/nixpkgs-unstable";
inputs.flake-utils.url = "github:numtide/flake-utils";
outputs = { nixpkgs, flake-utils, haskellNix }:
flake-utils.lib.eachDefaultSystem (system:
outputs =
{
nixpkgs,
flake-utils,
haskellNix,
}:
flake-utils.lib.eachDefaultSystem (
system:
let
overlay = self: _: {
hsPkgs = self.haskell-nix.project' rec {
@ -25,10 +31,12 @@
ormolu = {
version = "latest";
modules = [
({ lib, ... }: {
options.nonReinstallablePkgs =
lib.mkOption { apply = lib.remove "Cabal"; };
})
(
{ lib, ... }:
{
options.nonReinstallablePkgs = lib.mkOption { apply = lib.remove "Cabal"; };
}
)
];
};
};
@ -47,8 +55,13 @@
};
pkgs = import nixpkgs {
inherit system;
overlays = [ haskellNix.overlay overlay ];
overlays = [
haskellNix.overlay
overlay
];
};
flake = pkgs.hsPkgs.flake { };
in flake // { defaultPackage = flake.packages."hello:exe:hello-exe"; });
in
flake // { defaultPackage = flake.packages."hello:exe:hello-exe"; }
);
}

View File

@ -5,23 +5,30 @@
inputs.nixpkgs.url = "github:NixOS/nixpkgs";
inputs.poetry2nix.url = "github:nix-community/poetry2nix";
outputs = { self, nixpkgs, flake-utils, poetry2nix }:
flake-utils.lib.eachDefaultSystem (system:
outputs =
{
self,
nixpkgs,
flake-utils,
poetry2nix,
}:
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = import nixpkgs {
inherit system;
overlays = [ poetry2nix.overlay ];
};
projectDir = ./.;
in {
defaultPackage =
pkgs.poetry2nix.mkPoetryApplication { inherit projectDir; };
in
{
defaultPackage = pkgs.poetry2nix.mkPoetryApplication { inherit projectDir; };
devShells.default = pkgs.mkShell {
buildInputs = [
(pkgs.poetry2nix.mkPoetryEnv { inherit projectDir; })
pkgs.poetry
];
};
});
}
);
}

View File

@ -11,18 +11,22 @@
inputs.pypi-deps-db.follows = "pypi-deps-db";
};
outputs = { nixpkgs, mach-nix, ... }:
outputs =
{ nixpkgs, mach-nix, ... }:
let
supportedSystems = [ "x86_64-linux" "x86_64-darwin" "aarch64-darwin" ];
forAllSystems = f:
nixpkgs.lib.genAttrs supportedSystems
(system: f system (import nixpkgs { inherit system; }));
in rec {
defaultApp = forAllSystems (system: _pkgs:
mach-nix.lib."${system}".mkPython {
requirements = builtins.readFile ./requirements.txt;
});
devShell = forAllSystems (system: pkgs:
pkgs.mkShell { buildInputs = [ defaultApp."${system}" ]; });
supportedSystems = [
"x86_64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
forAllSystems =
f: nixpkgs.lib.genAttrs supportedSystems (system: f system (import nixpkgs { inherit system; }));
in
rec {
defaultApp = forAllSystems (
system: _pkgs:
mach-nix.lib."${system}".mkPython { requirements = builtins.readFile ./requirements.txt; }
);
devShell = forAllSystems (system: pkgs: pkgs.mkShell { buildInputs = [ defaultApp."${system}" ]; });
};
}