-
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.
Rebuilt the flake using `fh init`. Moves the derviation inside the flake, removes unnecessary files
- Loading branch information
Showing
5 changed files
with
69 additions
and
72 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,21 +1,61 @@ | ||
# This flake was initially generated by fh, the CLI for FlakeHub (version 0.1.18) | ||
{ | ||
description = "A tool to configure scoped DNS resolvers on macOS"; | ||
# A helpful description of your flake | ||
description = "Scoped DNS helper tool for macOS"; | ||
|
||
inputs.nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.2411.*"; | ||
# Flake inputs | ||
inputs = { | ||
flake-schemas.url = "https://flakehub.com/f/DeterminateSystems/flake-schemas/*"; | ||
|
||
outputs = { nixpkgs, ... }: | ||
nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/*"; | ||
}; | ||
|
||
# Flake outputs that other flakes can use | ||
outputs = { self, flake-schemas, nixpkgs }: | ||
let | ||
forAllSystems = gen: | ||
nixpkgs.lib.genAttrs nixpkgs.lib.systems.flakeExposed | ||
(system: gen nixpkgs.legacyPackages.${system}); | ||
in { | ||
packages = forAllSystems (pkgs: { default = pkgs.callPackage ./. { }; }); | ||
# Helpers for producing system-specific outputs | ||
supportedSystems = [ "aarch64-darwin" ]; | ||
forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f { | ||
pkgs = import nixpkgs { inherit system; }; | ||
}); | ||
in | ||
{ | ||
# Schemas tell Nix about the structure of your flake's outputs | ||
schemas = flake-schemas.schemas; | ||
|
||
packages = forEachSupportedSystem ({ pkgs }: { | ||
default = pkgs.stdenv.mkDerivation { | ||
name = "scopeddnsutil"; | ||
src = ./.; | ||
|
||
# Including SwiftPM as a nativeBuildInput provides a buildPhase for you. | ||
# This by default performs a release build using SwiftPM, essentially: | ||
# swift build -c release | ||
nativeBuildInputs = with pkgs; [ | ||
swift | ||
swiftpm | ||
]; | ||
|
||
installPhase = '' | ||
binPath="$(swiftpmBinPath)" | ||
mkdir -p $out/bin | ||
cp $binPath/scopeddnsutil $out/bin/ | ||
''; | ||
}; | ||
}); | ||
|
||
devShells = forAllSystems (pkgs: { | ||
default = pkgs.mkShell.override { inherit (pkgs.swiftPackages) stdenv; } { | ||
buildInputs = [ pkgs.swift pkgs.swiftpm pkgs.swiftpm2nix pkgs.swiftPackages.Foundation ]; | ||
LD_LIBRARY_PATH = "${pkgs.swiftPackages.Dispatch}/lib"; | ||
# Development environments | ||
devShells = forEachSupportedSystem ({ pkgs }: { | ||
default = pkgs.mkShell { | ||
# Pinned packages available in the environment | ||
packages = with pkgs; [ | ||
nixpkgs-fmt | ||
swift | ||
swiftpm | ||
swiftpm2nix | ||
swiftPackages.Foundation | ||
]; | ||
}; | ||
}); | ||
}; | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.