Skip to content

Commit

Permalink
cool
Browse files Browse the repository at this point in the history
  • Loading branch information
adnanwahab committed May 16, 2024
1 parent 134cfaa commit b31bfe8
Show file tree
Hide file tree
Showing 2 changed files with 142 additions and 22 deletions.
102 changes: 98 additions & 4 deletions flake.lock

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

62 changes: 44 additions & 18 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -1,27 +1,53 @@
{
description = "A very basic flake";
description = "Example flake for using uv with Nix";

inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
poetry2nix.url = "github:nix-community/poetry2nix";
};

outputs = { self, nixpkgs }: {
packages = {
x86_64-linux = {
hello = nixpkgs.legacyPackages.x86_64-linux.hello;
outputs = { self, nixpkgs, poetry2nix }:
let
pkgs = import nixpkgs {
system = "aarch64-darwin";
overlays = [ poetry2nix.overlay ];
};
aarch64-darwin = {
hello = nixpkgs.legacyPackages.aarch64-darwin.hello;
in {
devShells.default = pkgs.mkShell {
buildInputs = [
pkgs.python310
pkgs.poetry
pkgs.cargo
pkgs.uv
];
};
aarch64-linux = {
hello = nixpkgs.legacyPackages.aarch64-linux.hello;
};
};

defaultPackage = {
x86_64-linux = self.packages.x86_64-linux.hello;
aarch64-darwin = self.packages.aarch64-darwin.hello;
aarch64-linux = self.packages.aarch64-linux.hello;
};
};
}

# {
# description = "A very basic flake";

# inputs = {
# nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
# };

# outputs = { self, nixpkgs }: {
# packages = {
# x86_64-linux = {
# hello = nixpkgs.legacyPackages.x86_64-linux.hello;
# };
# aarch64-darwin = {
# hello = nixpkgs.legacyPackages.aarch64-darwin.hello;
# };
# aarch64-linux = {
# hello = nixpkgs.legacyPackages.aarch64-linux.hello;
# };
# };

# defaultPackage = {
# x86_64-linux = self.packages.x86_64-linux.hello;
# aarch64-darwin = self.packages.aarch64-darwin.hello;
# aarch64-linux = self.packages.aarch64-linux.hello;
# };
# };
# }

0 comments on commit b31bfe8

Please sign in to comment.