Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for new meta.repository field #751

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions flake-info/src/data/import.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ pub struct Meta {
pub license: Option<OneOrMany<StringOrStruct<License>>>,
pub maintainers: Option<Flatten<Maintainer>>,
pub homepage: Option<OneOrMany<String>>,
pub repository: Option<OneOrMany<String>>,
pub platforms: Option<Platforms>,
#[serde(rename = "badPlatforms")]
pub bad_platforms: Option<Platforms>,
Expand Down
7 changes: 4 additions & 3 deletions flake.lock

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

2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
nixConfig.extra-substituters = [ "https://nixos-search.cachix.org" ];
nixConfig.extra-trusted-public-keys = [ "nixos-search.cachix.org-1:1HV3YF8az4fywnH+pAd+CXFEdpTXtv9WpoivPi+H70o=" ];

inputs.nixpkgs.url = "nixpkgs/nixos-unstable";
inputs.nixpkgs.url = "github:NixOS/nixpkgs?rev=e3652e0735fbec227f342712f180f4f21f0594f2";
inputs.flake-utils.url = "github:numtide/flake-utils";
inputs.npmlock2nix.url = "github:nix-community/npmlock2nix";
inputs.npmlock2nix.flake = false;
Expand Down
8 changes: 8 additions & 0 deletions frontend/src/Page/Packages.elm
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ type alias ResultItemSource =
, platforms : List String
, position : Maybe String
, homepage : List String
, repository : List String
, system : String
, hydra : Maybe (List ResultPackageHydra)
, flakeName : Maybe String
Expand Down Expand Up @@ -379,6 +380,12 @@ viewResultItem nixosChannels channel showInstallDetails show item =
)
|> Maybe.withDefault []
)
-- ++ (item.source.repository
-- |> List.head
-- |> Maybe.map
-- (\x -> [ li [ trapClick ] [ createShortDetailsItem "Repo" x ] ])
-- |> Maybe.withDefault []
-- )
++ renderSource item nixosChannels channel trapClick createShortDetailsItem createGithubUrl
++ (let
licenses =
Expand Down Expand Up @@ -965,6 +972,7 @@ decodeResultItemSource =
|> Json.Decode.Pipeline.required "package_platforms" (Json.Decode.map filterPlatforms (Json.Decode.list Json.Decode.string))
|> Json.Decode.Pipeline.required "package_position" (Json.Decode.nullable Json.Decode.string)
|> Json.Decode.Pipeline.required "package_homepage" decodeHomepage
|> Json.Decode.Pipeline.required "package_repository" decodeHomepage
|> Json.Decode.Pipeline.required "package_system" Json.Decode.string
|> Json.Decode.Pipeline.required "package_hydra" (Json.Decode.nullable (Json.Decode.list decodeResultPackageHydra))
|> Json.Decode.Pipeline.optional "flake_name" (Json.Decode.map Just Json.Decode.string) Nothing
Expand Down