Skip to content

Commit

Permalink
flake.nix: multi-platform support with flake-utils
Browse files Browse the repository at this point in the history
  • Loading branch information
lpenz committed Feb 13, 2023
1 parent 833bf50 commit d196f9d
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 10 deletions.
16 changes: 16 additions & 0 deletions flake.lock

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

28 changes: 18 additions & 10 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -1,15 +1,23 @@
{
description = "Execute a command periodically, showing the output only when it changes";
inputs.nixpkgs.url = github:NixOS/nixpkgs/nixos-unstable;
outputs = { self, nixpkgs }: {
packages.x86_64-linux.default =
with import nixpkgs { system = "x86_64-linux"; };

rustPlatform.buildRustPackage {
pname = "ogle";
version = "1.4.4";
src = self;
cargoLock.lockFile = ./Cargo.lock;
};
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};

outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages."${system}";
in
rec {
packages.default = pkgs.rustPlatform.buildRustPackage {
pname = "ogle";
version = "1.4.4";
src = self;
cargoLock.lockFile = ./Cargo.lock;
};
}
);
}

0 comments on commit d196f9d

Please sign in to comment.