diff --git a/frontend/src/Page/Packages.elm b/frontend/src/Page/Packages.elm index 58c97ebd..fb134ef6 100644 --- a/frontend/src/Page/Packages.elm +++ b/frontend/src/Page/Packages.elm @@ -639,17 +639,32 @@ viewResultItem nixosChannels channel showInstallDetails show item = , ul [ class "nav nav-tabs" ] <| [ li [ classList - [ ( "active", List.member showInstallDetails [ Search.Unset, Search.ViaNixShell, Search.FromFlake ] ) + [ ( "active", showInstallDetails == Search.ViaNixEnv ) , ( "pull-right", True ) ] ] [ a [ href "#" + , class "deprecated" , Search.onClickStop <| SearchMsg <| - Search.ShowInstallDetails Search.ViaNixShell + Search.ShowInstallDetails Search.ViaNixEnv ] - [ text "nix-shell" ] + [ text "nix-env" ] + ] + , li + [ classList + [ ( "active", showInstallDetails == Search.ViaNixProfile ) + , ( "pull-right", True ) + ] + ] + [ a + [ href "#" + , Search.onClickStop <| + SearchMsg <| + Search.ShowInstallDetails Search.ViaNixProfile + ] + [ text "nix profile" ] ] , li [ classList @@ -667,7 +682,7 @@ viewResultItem nixosChannels channel showInstallDetails show item = ] , li [ classList - [ ( "active", showInstallDetails == Search.ViaNixEnv ) + [ ( "active", List.member showInstallDetails [ Search.Unset, Search.ViaNixShell, Search.FromFlake ] ) , ( "pull-right", True ) ] ] @@ -675,9 +690,9 @@ viewResultItem nixosChannels channel showInstallDetails show item = [ href "#" , Search.onClickStop <| SearchMsg <| - Search.ShowInstallDetails Search.ViaNixEnv + Search.ShowInstallDetails Search.ViaNixShell ] - [ text "nix-env" ] + [ text "nix-shell" ] ] ] , div @@ -800,6 +815,18 @@ viewResultItem nixosChannels channel showInstallDetails show item = , strong [] [ text item.source.attr_name ] ] ] + , div + [ classList + [ ( "active", showInstallDetails == Search.ViaNixProfile ) + ] + , class "tab-pane" + , id "package-details-nixpkgs" + ] + [ pre [ class "code-block shell-command" ] + [ text "nix profile install nixpkgs#" + , strong [] [ text item.source.attr_name ] + ] + ] ] ] , programs diff --git a/frontend/src/Search.elm b/frontend/src/Search.elm index e39eb6f8..622005ff 100644 --- a/frontend/src/Search.elm +++ b/frontend/src/Search.elm @@ -405,6 +405,7 @@ type Msg a b type Details = ViaNixShell | ViaNixOS + | ViaNixProfile | ViaNixEnv | FromFlake | Unset diff --git a/frontend/src/index.scss b/frontend/src/index.scss index 83e6ba6f..6d77897b 100644 --- a/frontend/src/index.scss +++ b/frontend/src/index.scss @@ -766,6 +766,10 @@ header .navbar.navbar-static-top { & > li > a { margin-right: 0; } + + .deprecated { + color: var(--text-color-light); + } } div.tab-content {