diff --git a/examples/flake_auto_rev/anysnake2.toml b/examples/flake_auto_rev/anysnake2.toml index 58138c9..3e8d85f 100644 --- a/examples/flake_auto_rev/anysnake2.toml +++ b/examples/flake_auto_rev/anysnake2.toml @@ -1,32 +1,46 @@ [anysnake2] -url2 = "dev" + rev = "dev" # pre 2.0 - 2.0+ uses url2 + url = "github:TyberiusPrime/anysnake2_release_flakes" # pre 2.0 - 2.0+ uses url2 + url2 = "dev" -[nixpkgs] -url = "github:NixOS/nixpkgs/master/24.05" - -[outside_nixpkgs] -url = "github:NixOS/nixpkgs/master/24.05" -[ancient_poetry] -url = "git+https://codeberg.org/TyberiusPrime/ancient-poetry.git?ref=main&rev=68f1e759c557757e55d05027319d5c9751626fba" - -[poetry2nix] -url = "github:nix-community/poetry2nix/master/48e7ed4ef7832efa5a5558e573986c4128fc478f" +[nixpkgs] + url = "github:NixOS/nixpkgs/master/24.05" [flakes.hello] # # rev get's auto detected - url = "github:TyberiusPrime/hello_flake/main" + url = "github:TyberiusPrime/hello_flake/main/f32e7e451e9463667f6a1ddb7a662ec70d35144b" + [flakes.hello2] - url = "git+https://github.com/TyberiusPrime/hello_flake?ref=main" - follows = ["nixpkgs"] # so we overwrite the flakes dependencies + follows = ["nixpkgs"] # so we overwrite the flakes dependencies + url = "git+https://github.com/TyberiusPrime/hello_flake?ref=main&rev=f32e7e451e9463667f6a1ddb7a662ec70d35144b" + [flakes.hello_merucrial] - url = "hg+https://hg.sr.ht/~tyberius_prime/hello_flake" + url = "hg+https://hg.sr.ht/~tyberius_prime/hello_flake?rev=ed4abef5589800a2f1cf43282b46f180bc46fa0d" + + +[dev_shell] + inputs = [] + shell = "bash" + + +[outside_nixpkgs] + url = "github:NixOS/nixpkgs/master/24.05" + + +[ancient_poetry] + url = "git+https://codeberg.org/TyberiusPrime/ancient-poetry.git?ref=main&rev=68f1e759c557757e55d05027319d5c9751626fba" + + +[poetry2nix] + url = "github:nix-community/poetry2nix/master/48e7ed4ef7832efa5a5558e573986c4128fc478f" + [flake-util] -url = "github:numtide/flake-utils/main/b1d9ab70662946ef0850d488da1c9019f3a9752a" + url = "github:numtide/flake-utils/main/b1d9ab70662946ef0850d488da1c9019f3a9752a" # follows = ["nixpkgs"] # so we overwrite the flakes dependencies diff --git a/src/flake_writer.rs b/src/flake_writer.rs index cc82ec2..ffb9dc7 100644 --- a/src/flake_writer.rs +++ b/src/flake_writer.rs @@ -928,7 +928,10 @@ fn add_flakes( &rev_follows[..], )); if flake.packages.is_empty() { - nixpkgs_pkgs.insert(format!("{}.{}", name, "defaultPackage.x86_64-linux")); + nixpkgs_pkgs.insert(format!( + "({}.defaultPackage.x86_64-linux or {}.packages.x86_64-linux.defaults)", + name, name + )); } else { for pkg in &flake.packages { nixpkgs_pkgs.insert(format!("{name}.{pkg}"));