-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
136 lines (135 loc) · 4.93 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
<!DOCTYPE html>
<html lang="en">
<!-- Deployed SHA: %VITE_GITHUB_SHA% -->
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" type="image/png" href="/favicon.png" />
<link rel="stylesheet" href="css/base-min.css">
<link rel="stylesheet" href="css/pure-min.css">
<link rel="stylesheet" href="css/grids-responsive-min.css">
<link rel="stylesheet" href="css/styles.css">
<meta
name="description"
content="Search nix packages install old versions"
/>
<link rel="apple-touch-icon" href="/logo192.png" />
<!--
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="/manifest.json" />
<title>Nix Package Search</title>
<!-- Start Single Page Apps for GitHub Pages -->
<script type="text/javascript">
// Single Page Apps for GitHub Pages
// MIT License
// https://github.com/rafgraph/spa-github-pages
// This script checks to see if a redirect is present in the query string,
// converts it back into the correct url and adds it to the
// browser's history using window.history.replaceState(...),
// which won't cause the browser to attempt to load the new url.
// When the single page app is loaded further down in this file,
// the correct url will be waiting in the browser's history for
// the single page app to route accordingly.
(function(l) {
if (l.search[1] === '/' ) {
var decoded = l.search.slice(1).split('&').map(function(s) {
return s.replace(/~and~/g, '&')
}).join('?');
window.history.replaceState(null, null,
l.pathname.slice(0, -1) + decoded + l.hash
);
}
}(window.location))
</script>
<!-- End Single Page Apps for GitHub Pages -->
</head>
<body>
<div class="header">
<div class="home-menu pure-menu pure-menu-horizontal pure-menu-fixed" id="menu" hidden>
<ul class="pure-menu-list">
<li class="pure-menu-item pure-menu-selected" id="menu-home">
<a href="#" class="pure-menu-link">Home</a>
</li>
<li class="pure-menu-item" id="menu-search">
<a href="#" class="pure-menu-link">Search</a>
</li>
</ul>
</div>
</div>
<div class="container">
<div class="content">
<div class="pure-g">
<div class="pure-u-1 pure-u-md-3-5" id="home">
<p>
Every night the list of packages is exported and then merged into a
single CSV file that has every package version.
</p>
<p>
The CSV has a column for the <code>pname</code>, the nix
package name, the <code>name</code>,
the <code>version</code> and the <code>sha</code> of the
commit it was added.
</p>
<p>
For example, to find which sha <code>go-15.10</code> appeared, you can
run
</p>
<p>
<code>
curl -sSfL
https://ahobson.github.io/nix-package-search/nix/nixpkgs-unstable/all_packages.csv
| grep 'go-1.15.10'
</code>
</p>
The result would look like
<p>
<code>
go,go_1_15,go-1.15.10,1.15.10,674c39c08fb94d315cb9bc699da33fd1be4b4e2e
</code>
</p>
<div id="noscript">
<p>
If you enable javascript, you will be able to search packages
via your browser.
</p>
</div>
</div>
<div class="pure-u-1" id="search" hidden>
<form class="pure-form">
<input type="text" placeholder="Search" id="search-input"/>
</form>
<div id="table-container">
<table class="pure-table pure-table-bordered" id="search-results-table">
<thead>
<tr>
<th>Show/Hide Nix Expression</th>
<th>Name</th>
<th>Nix Package Name</th>
<th>SHA</th>
</tr>
</thead>
<tbody id="search-results-tbody"/>
</table>
</div>
</div>
</div>
</div>
</div>
<template id="nix-pkg-info-tmpl">
<tr>
<td class="nix-pkg-info-show-hide"/>
<td class="nix-pkg-info-name"/>
<td class="nix-pkg-info-nixPackageName"/>
<td class="nix-pkg-info-sha"/>
</tr>
</template>
<template id="nix-pkg-expr-tmpl">
<tr hidden>
<td class="nix-pkg-expr" colspan="4"/>
</tr>
</template>
<script type="module" src="/src/main.ts"></script>
</body>
</html>